フィルターのクリア

syncing map image with coordinates

4 ビュー (過去 30 日間)
Shachar Givon
Shachar Givon 2018 年 5 月 1 日
コメント済み: Guillaume 2018 年 5 月 2 日
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!

採用された回答

Guillaume
Guillaume 2018 年 5 月 1 日
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 件のコメント
Shachar Givon
Shachar Givon 2018 年 5 月 1 日
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 2018 年 5 月 2 日
I'm not sure what you're asking. In any case, this is way outside my field of expertise.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by