Matlab SURF指向像素坐标

标签 matlab image-processing matching surf matlab-cvst

我想从返回的 SURF 点中提取 (x,y) 像素坐标,如 the example provided here using Matlab 中的示例.很明显,使用“ptsIn(1).Location”我可以返回点的 (x,y) 坐标。但是返回的点也包括一些小数点,例如 (102.9268, 51.7285)。有什么方法可以将其转换为图像平面中的像素位置,或者仅对这些值进行平均即可得出像素位置?谢谢。

最佳答案

为了进一步理解它,我尝试了以下代码 in this link .

% Extract SURF features
  I = imread('cameraman.tif');
  points = detectSURFFeatures(I);
  [features, valid_points] = extractFeatures(I, points);

% Visualize 10 strongest SURF features, including their 
% scales and orientation which were determined during the 
% descriptor extraction process.
  imshow(I); hold on;
  strongestPoints = valid_points.selectStrongest(10);
  strongestPoints.plot('showOrientation',true);

然后,在 Matlab 控制台中尝试命令 strongestPoints.Location,它返回以下 (x,y) 坐标。

139.7482 95.9542 107.4502 232.0347 116.6112 138.2446 105.5152 172.1816 113.6975 48.7220 104.4210 75.7348 111.3914 154.4597 106.2879 175.2709 131.1298 98.3900 124.2933 64.4942

由于有一个坐标(107.4502 232.0347),我尝试将第232行标记为黑色(I(232,:)=0;),看看它是否匹配232.0347中的y坐标SURF点,收到如下图。因此,似乎 SURF 点的四舍五入值给出了图像的 (x,y) 像素坐标。 enter image description here

关于Matlab SURF指向像素坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23421094/

相关文章:

math - 根据约束对矩阵进行归一化

matlab - 如何在MATLAB中很好地向量化以下关于向量的偏导数?

java - 自动缩放和旋转图像

C++ 在两个 std::map 之间查找匹配项的有效方法

swift - 具有 4 个可选字符串的对象?具有加权值的属性,如何返回与一组属性最匹配的对象

c++ - 在 C++ 中创建一个执行 Matlab 操作 [z;z] 的函数,其中 z 是矩阵或 vector

使用 scipy.io 将 python pandas 数据框转换为 matlab 结构

ios - 使用 GPUImage 过滤器动态更改值

java - 从一维数组构建图像

algorithm - 带着购物 list 逛超市,最快买到所有商品?