Shifting of image's origin to the highest Y coordinates
1 view (last 30 days)
Show older comments
Hi,
I am trying to shift the origin of a image to the highest Y-coordinate of an image.
currently my image is like this with the origin at the intersection of the vertical and horizontal axis at the top left corner:
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
I want to shift the origin to as such:
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
where the intersection is the origin which is also the highest point of the outer cornea.
Is there anyway that i can do this?
Thank you very much.
Best Regards, natur3
0 Comments
Accepted Answer
Image Analyst
on 22 Sep 2012
Just find that point, and subtract the row and column value of the origin from all other row and column values that you measure anywhere else in your program. Let's say it's row=73, column = 631. So then let's say you have some other point, let's say row=273, column = 931. Then with respect to your new origin, you'd have a row of 273-73 = 200, and a column of 931-631 = 300 in your new coordinate system.
3 Comments
Image Analyst
on 22 Sep 2012
No. the 273,931 is not an original origin - it was just some arbitrary pixel in the image. You subtract 73, 631 for any such pixels. The second pair of numbers I gave was just an example of some other arbitrary pixel in the image that you wanted to know the coordinates of with respect to the new origin.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!