Convert an image pixel coordinate to physical coordinate
Show older comments
Dear All,
I have a 2D array over the range xmin<x<xmax and ymin<y<ymax which contains the color intensity of each point. It looks like a deformed donut. I needed to find the inner and outer boundary of the donut. In order to achieve this goal, I used image processing and found the boundaries by bwboundaries function. Now I have the boundaries. The boundaries are in rows and columns coordinate. I want to convert them back into physical x,y coordinates. How can I do it?
Thanks,
Ahmad
Accepted Answer
More Answers (1)
You need to know the coordinates row0,col0 of the physical origin and the pixel sizes. With this, you do
physicalCoords = ([row,col]-[row0,col0]).*pixelsizes
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!