Shifting of image's origin to the highest Y coordinates
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Image Analyst
2012 年 9 月 22 日
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 件のコメント
Image Analyst
2012 年 9 月 22 日
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.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!