分享

建立matlab中的cvexShowMatches函数的类似函数

 liyanweicc 2011-12-08
matlab 2011b中的函数cvexShowMatches()显示匹配图像是非常不爽。
执行如下代码:
I1 = imread('cameraman.tif');
I2 = imresize(imrotate(I1,-20), 1.2);
 
points1 = detectSURFFeatures(I1,'MetricThreshold',10000);
points2 = detectSURFFeatures(I2,'MetricThreshold',10000);
 
[f1, vpts1] = extractFeatures(I1, points1);
[f2, vpts2] = extractFeatures(I2, points2);
        
index_pairs = matchFeatures(f1, f2) ;
matched_pts1 = vpts1(index_pairs(:, 1));
matched_pts2 = vpts2(index_pairs(:, 2));
% Note that there are still several outliers present in the data, but
% otherwise you can clearly see the effects of rotation and scaling on
% the display of matched features.
  cvexShowMatches(I1,I2,matched_pts1,matched_pts2); % show matching points
 
显示的图像如下:
 
 这非常不方便,看起来一点都不清楚。
于是自己修改了cvexShowMatches() 这个函数,这样,就可以显示下面的图像了。是不是比较方便了?
修改好的函数在最后。请下载。
 
 
cvexShowMatches2()下载:http://dl./u/48006175/cvexShowMatches2.m

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多