2
下面的代码显示了两个图像之间的对应特征点。我怎样才能得到这个点的像素指数?例如,我想要将位于第一个图像中的第一个特征点的像素索引(行和列)。与特征点检测相关的像素索引
I1=rgb2gray(imread('peau.jpg'));
I2=imresize(imrotate(I1,-20),1.2);
points1=detectSURFFeatures(I1);
points2=detectSURFFeatures(I2);
[f1,vpts1] = extractFeatures(I1, points1);
[f2,vpts2] = extractFeatures(I2, points2);
[indexPairs,cv] = matchFeatures(f1, f2) ;
matchedPoints1 = vpts1(indexPairs(:, 1));
matchedPoints2 = vpts2(indexPairs(:, 2));
figure; ax = axes;
showMatchedFeatures(I1,I2,matchedPoints1,matchedPoints2);
legend(ax,'Matched points 1','Matched points 2');
非常感谢你rayryeng –
不客气。如果您不再需要帮助,请考虑接受我的答案。这可以通过点击我帖子顶部的复选标记图标来完成,在向上和向下投票按钮的左下方。祝你好运! – rayryeng