【问题标题】:How can I find the matching features from two images when the matrices containing their extracted features are of different size?当包含提取特征的矩阵大小不同时,如何从两张图像中找到匹配特征?
【发布时间】:2016-08-11 19:39:09
【问题描述】:
img1 = imread('01.01.bmp');
img2 = imread('01.02.bmp');

feature1 = sift_f(img1);
feature2 = sift_f(img2);


indexPairs = matchFeatures(feature1,feature2) ;
matchedPoints1 = vpts1(indexPairs(:,1));
matchedPoints2 = vpts2(indexPairs(:,2));
figure; showMatchedFeatures(img1,img2,matchedPoints1,matchedPoints2);
legend('matched points 1','matched points 2');

矩阵 feature1 和 feature2 的大小不同。事实上,它们的列数不同。因此,matchFeatures() 函数不起作用。那我该如何匹配特征呢?

【问题讨论】:

  • 这当然高度依赖于输入。尝试将初始图像的大小调整为相同的分辨率,然后它应该可以工作
  • 矩阵的大小是多少?

标签: matlab image-processing feature-extraction matlab-cvst sift


【解决方案1】:

matchFeatures 期望 features1features2 是矩阵,其中每一行是一个特征向量。所以它期望features1features2 具有相同的列数,但行数可以不同。可能您只需将features1features2 转置为matchFeatures

features1features2 的大小是多少? SIFT 描述符的长度通常为 128。因此,如果大小为 128×N,那么您肯定需要转置它们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-09
    • 2020-07-29
    • 2014-04-11
    • 2020-02-18
    • 1970-01-01
    • 1970-01-01
    • 2022-01-05
    • 1970-01-01
    相关资源
    最近更新 更多