Borrar filtros
Borrar filtros

syncing map image with coordinates

4 visualizaciones (últimos 30 días)
Shachar Givon
Shachar Givon el 1 de Mayo de 2018
Comentada: Guillaume el 2 de Mayo de 2018
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!

Respuesta aceptada

Guillaume
Guillaume el 1 de Mayo de 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 comentarios
Shachar Givon
Shachar Givon el 1 de Mayo de 2018
That was definitely the issue, and that solved it, thanks!
Do you may be have an idea for a better way to achieve a synchronization of coordination and satellite image background? My way was pretty brute force and the syncing of the scale was not good.
Guillaume
Guillaume el 2 de Mayo de 2018
I'm not sure what you're asking. In any case, this is way outside my field of expertise.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by