Convert a mosaic picture to xy coordinate

1 次查看(过去 30 天)
Ivan MO
Ivan MO2020-3-12
编辑: Pranjal Kaura ,2021-9-29
I have a mosaic picture. I would like to have a xy coordinate on it to indicate the location of each tiles. How can I do that ??
I am new to matlab image analysis. I really have no idea on it. Please help! Thank you very much.
Here is a sample of the mosaic picture with around 2500 tiles.
  5 个评论
Ivan MO
Ivan MO 2020-3-13
The xy-axis should be outside the mosaic picture, just like the xy coordinate of a plot. The value of xy-axis should be located within the middle of a tile so that I can locate the tile in terms of (X,Y).


回答(1 个)

Pranjal Kaura
Pranjal Kaura 2021-9-29
编辑:Pranjal Kaura 2021-9-29
Hey Ivan,
You can use the 'xticks' and 'yticks' function to add custom ticks to an axes. You could set the axes labels to '1:num_Columns' and '1:num_Rows' according your mosaic plot.
If you're using imshow to display your image, you could create a custom axes obect and set it as the parent axis of the image object. You could refer to the following code snippet for this.
You could also refer to this answer for more help.
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by