script_example.m
上传用户:trade789
上传日期:2018-05-10
资源大小:603k
文件大小:1k
源码类别:

2D图形编程

开发平台:

Matlab

  1. img1 = imread('ima1.jpg');
  2. figure(1);
  3. image(img1);
  4. colormap(gray(256));
  5. title('ima1.jpg');
  6. drawnow;
  7. % Detect the SIFT features:
  8. fprintf(1,'Computing the SIFT features for ima1.jpg...n')
  9. [features1,pyr1,imp1,keys1] = detect_features(img1);
  10. figure(2);
  11. showfeatures(features1,img1);
  12. title('SIFT features of image ima1.jpg');
  13. drawnow;
  14. img2 = imread('ima2.jpg');
  15. figure(3);
  16. image(img2);
  17. colormap(gray(256));
  18. title('ima2.jpg');
  19. drawnow;
  20. % Detect the SIFT features:
  21. fprintf(1,'Computing the SIFT features for ima2.jpg...n')
  22. [features2,pyr2,imp2,keys2] = detect_features(img2);
  23. figure(4);
  24. showfeatures(features2,img2);
  25. title('SIFT features of image ima2.jpg');
  26. img3 = imread('ima3.jpg');
  27. figure(5);
  28. image(img3);
  29. colormap(gray(256));
  30. title('ima3.jpg');
  31. drawnow;
  32. % Detect the SIFT features:
  33. fprintf(1,'Computing the SIFT features for ima3.jpg...n')
  34. [features3,pyr3,imp3,keys3] = detect_features(img3);
  35. figure(6);
  36. showfeatures(features3,img3,1);
  37. title('SIFT features of image ima3.jpg');