t1=clock;
%% Step 1: Read Images
% Read the reference image containing the object of interest.
boxImage =imread('C:\Users\Administrator\Desktop\lena2.bmp');
% figure;
% imshow(boxImage);¡¾
% title('Image of a Box');
%%
% Read the target image containing a cluttered scene.
sceneImage =imread('C:\Users\Administrator\Desktop\lena.bmp');
% figure;
% imshow(sceneImage);
% title('Image of a Cluttered Scene');
%% Step 2: Detect Feature Points
% Detect feature points in both images.
boxPoints = detectSURFFeatures(boxImage);
scenePoints = detectSURFFeatures(sceneImage);
% boxPoints = detectHarrisFeatures(boxImage);
% scenePoints = detectHarrisFeatures(sceneImage);
%%
% Visualize the strongest feature points found in the reference image.
figure;
subplot(1,2,1);
imshow(boxImage);
% title('100 Strongest Feature Points from Box Image');
hold on;
plot(selectStrongest(boxPoints, 30));
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载