syncing map image with coordinates
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have an array of coordinates that I want to display on top of a map of the area. I have all the images I am discussing here attached. I displayed the coordinates with a scatter plot
scatter(x,y)
and that worked fine (image : coordinate points) I displayed the map images with
imshow(pic)
and that worked fine (image : map) I tried to display them one on top of the other
imshow()
hold on
scatter
hold off
and everything goes wrong. the coordinates are twisted and mirror imaged, and the map is twisted as well. (image : xmap) I should add that I tweaked my coordinates so that since the left bottom corner of my map is pixel (1,1) then the coordinate for that spot will be (1,1) as well. my attempt at syncing.
Any idea what went wrong? How to fix it? Or how to do a better job of it?
Thanks!
0 Commenti
Risposta accettata
Guillaume
il 1 Mag 2018
The convention for images is that the top left corner is the origin with the y-axis pointing down. However, you're using a different coordinate system for your x and y. You're going to have to change one of the inputs so that it uses the coordinate system of the other.
Probably the easiest is to flip the image upside-down then display it using the scatter coordinate system:
figure;
imshow(flipud(pic));
axis xy;
scatter(x, y);
2 Commenti
Guillaume
il 2 Mag 2018
I'm not sure what you're asking. In any case, this is way outside my field of expertise.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!