Automatically scale and rotate images

Given:

  • two images of the same subject;
  • images have the same resolution, color depth and file format;
  • images vary in size and rotation; and
  • two lists of coordinates (x, y) that correlate images.

I'd like to know:

  • How to convert a larger image so that it visually matches the second image?
  • (Optional.) What is the minimum number of points needed for accurate conversion?
  • (Optional.) How far must the points be to get the exact transformation?

The transformation would have to rotate, scale, and possibly shift the larger image. Essentially, I want to create (or find) a program that does the following:

  • Enter two images (for example, TIFF).
  • Click multiple anchor points in a small image.
  • Click on several corresponding anchor points in a large image.
  • Converts a large image so that it matches a small image by aligning anchor points.

This will help align the images of the same stellar object. (For example, a hand-drawn picture from 1855 on a photograph taken by Hubble in 2000.)

Many thanks in advance for any algorithms (preferably Java or similar pseudo codes), ideas or links to related open source software packages.

+4
source share
3 answers

This is called Image Registration .

Mathworks discusses this, Matlab has this ability, and more information is in the Elastix Manual .

Consider:

+1
source

You can use javax.imageio or Java Advanced Imaging api to rotate, move and scale images as soon as you know what you want to do with them.

0
source

For C ++ implementation (without GUI) try the old KLT tracker (Kanade-Lucas-Tomasi).

http://www.ces.clemson.edu/~stb/klt/

0
source

All Articles