zoukankan      html  css  js  c++  java
  • 修改matlab中的cvexShowMatches函数,使匹配结果更清楚

       

    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.dropbox.com/u/48006175/cvexShowMatches2.m

  • 相关阅读:
    Largest Submatrix of All 1’s
    Max Sum of Max-K-sub-sequence
    Sticks Problem
    Splay模版
    B. Different Rules
    链表合并 leetcode
    K个一组翻转链表
    反转链表2 leetcode
    nodejs简单仿apache页面
    HTML 5 Web Workers
  • 原文地址:https://www.cnblogs.com/liyanwei/p/2280584.html
Copyright © 2011-2022 走看看