Matlab SURF points to pixel coordinates

…衆ロ難τιáo~ 提交于 2019-12-10 16:59:15

问题


I want to extract (x,y) pixel coordinates out of the SURF points returned, as an example in the example provided here using Matlab. It is clear that using 'ptsIn(1).Location' I can return the (x,y) coordinates of the point. But the points retuned included some decimal points as well, as an example (102.9268, 51.7285). Is there any way to convert this to pixel positions in the image plane, or just averaging these values will give the pixel positions? Thank you.


回答1:


To understand it further I tried the following code 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);

Then, tried the command strongestPoints.Location in the Matlab console, which returned the following (x,y) coordinates.

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

Since there is a coordinate (107.4502 232.0347), I tried to mark the row 232 as black (I(232,:)=0;) to see whether it matches 232.0347 y coordinate in the SURF point, and received the following figure. So it seems rounded values of the SURF points give the (x,y) pixel coordinates of the image.



来源:https://stackoverflow.com/questions/23421094/matlab-surf-points-to-pixel-coordinates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!