MATLAB: Coordinates pixel (cpselect)

control pointscpselectImage Processing Toolboxpixel

Hello,
Im using this cpselect function to select control points on two images. I can get those coordinates of each control point,which is great. The problem is that those coordinates aren't pixel coordinates. how can i get my pixel coordinates from an image using an interactive method?

Best Answer

I would recommend using the function ginput instead, for example:
I = imread('rice.png');
imshow(I) %This is necessary for the ginput function expects a figure window to be open.
[x y] = ginput(n) %Where n is the number of points you need to interactively select.
and the x and y coordinates (of the pixel selected) will be stored in the vectors x and y.
Hope this helps!
Related Question