Data cursor: Let Y coordinate increase instead of decrease (moving from bottom to top)
이전 댓글 표시
Dear all,
I have a screenshot of Google maps and I want to obtain the coordinates of the stars on the image.
I used Tools > Data Cursor and what I got was this:

Now the problem is, when you go more to right in the image, the X coordinate increases. But when you go up in the images, the Y coordinate decreases (instead of increasing).
How can I change this? At the end I need a list of all the coordinates.
Thank you!
Regards,
답변 (1개)
Flip your image in the vertical dimension before plotting it, e.g.
figure; hAxes = gca; imagesc( hAxes, flip( myImage, 1 ) );
then use
set( hAxes, 'YDir', 'normal' )
where hAxes is your axes handle.
댓글 수: 4
corneel
2017년 6월 16일
Adam
2017년 6월 16일
You can't change the data cursor points once they are picked. I can't remember off-hand if you can get data cursor points afterwards either, I only ever use a couple at any time.
You would have to put my command before plotting so yes you would lose all the picks.
Is it that important that they increase in that direction?
If you are able to get hold of them then you can just subtract all the y values from the maximum to flip them round.
corneel
2017년 6월 18일
Adam
2017년 6월 19일
The maximum should just be the number of rows in your image if you didn't plot it with any specific y values.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!