Hi i am trying to extract the coordinates from image (e.g. circle.png attached)
I use ginput to extract x,y coorinate of my interest (in this case 4 red dots inside the circle)
A=imread('circle.png');
figure,imshow(A)
[y,x]=ginput
I click on 4 red dots and I got x,y coordinates as below
x=134.000000000000
154.000000000000
125.000000000000
136.000000000000
y= 83
153.000000000000
170.000000000000
245.000000000000
In this case, x and y coordinates that I got are based on which axis? How can I convert these x and y coordinates to relate into my real data (i.e. I would like to show x axis from 0 to 15 and y axis from 0 to 5)?
By default
imshow
hides the tick marks of the axes on which the image is displayed. To see what the actual axis limits are (and hence how your image is scaled on the axis) you can doOr if you'd like to make the axis labels visible then you can do
The
x
andy
point returned byginput
are relative to those axis limits.