Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

Matlab SURF points to pixel coordinates

Date: 2022-12-03 12:23:54

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. 

Answer: 

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. enter image description here


Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com