I have an image in the world coordinate space, and found the position of a rotation center C of that image relative to the image coordinate system origin O(image top left corner) and now I want to rotate image to -Alpha to remove rotation and to standardize images in such way. I have tried to use opencv getRotationMatrix2D but it just returns black images because I need to calculate translation in some complex way, currently my calculations not working. There are similar questions OpenCV Python rotate image by X degrees around specific point, Image rotation using OpenCV but they provides only solutions that works for rotation around image center and nothing works for the rotation image about arbitrary point. Maybe someone know way how to rotate image around arbitrary point in the world coordinate space using OpenCv or any other python library.
Asked
Active
Viewed 207 times
1
-
It's a math question. First calculate the wrap matrix by yourself, then use OpenCV to finish the ratation. For the second step, here is an example: [How would I use Orb detector with image homography?](https://stackoverflow.com/questions/47496287/how-would-i-use-orb-detector-with-image-homography/47497745#47497745) – Kinght 金 Jan 24 '19 at 02:29