Match Rotations

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jmac698
Posts: 48
Joined: 2013-12-20T01:57:16-07:00
Authentication code: 6789

Match Rotations

Post by jmac698 »

Hi,
I've read about an upcoming feature for image registration, but it's not ready yet. I'm desperate to match two images by rotation. Would there be a way to rotate one image +-15 degrees and then do a correlation and pick which version matches best, as a simple way to find the rotation? The images are already centred, and they don't rotate much. Then I want to pick one reference image and rotate a whole directory of images to match it's rotation. The images are all the same except for rotation.

There's other programs like image analyzer, imagej etc. but I need to do batch image registration.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Match Rotations

Post by snibgo »

You can do this by trial-and error but, if you know the centre of rotation is the image centre, there is a much quicker method: depolar both images, search for one within the other, and the x-coordinate of the result gives the angle. My page "What rotation?" explains.
snibgo's IM pages: im.snibgo.com
Post Reply