Page 1 of 1

x,y coordinate transformation when image is rotated by 90 degrees

Posted: 2018-05-26T23:24:27-07:00
by manit
i have 512x512 image whose SIFT descriptors I had found.
Now i rotated image by 90 degree using
convert src.jpg -rotate 90 dest.jpg
what will be new coordinates of point x,y of src.jpg ?
I require this so that I can see SIFT descriptor change between correspondences in src.jpg and dest.jpg .

Thanks.

Re: x,y coordinate transformation when image is rotated by 90 degrees

Posted: 2018-05-27T05:48:48-07:00
by snibgo
If we rotate an image of height (h) 90 degrees clockwise, a pixel that was at (x,y) will be in new location (x',y') where:

x' = h - 1 - y
y' = x

Re: x,y coordinate transformation when image is rotated by 90 degrees

Posted: 2018-05-27T12:34:17-07:00
by manit
okay.
Thanks.

Re: x,y coordinate transformation when image is rotated by 90 degrees

Posted: 2018-05-27T14:11:22-07:00
by manit
verified it.
it works.