views:

530

answers:

3

Given:

  • two images of the same subject matter;
  • the images have the same resolution, colour depth, and file format;
  • the images differ in size and rotation; and
  • two lists of (x, y) co-ordinates that correlate the images.

I would like to know:

  • How do you transform the larger image so that it visually aligns to the second image?
  • (Optional.) What are the minimum number of points needed to get an accurate transformation?
  • (Optional.) How far apart do the points need to be to get an accurate transformation?

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

  1. Input two images (e.g., TIFFs).
  2. Click several anchor points on the small image.
  3. Click the several corresponding anchor points on the large image.
  4. Transform the large image such that it maps to the small image by aligning the anchor points.

This would help align pictures of the same stellar object. (For example, a hand-drawn picture from 1855 mapped to a photograph taken by Hubble in 2000.)

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

+1  A: 

This is called Image Registration.

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

Consider:

Dave Jarvis
A: 

you can use the javax.imageio or Java Advanced Imaging api's for rotating, shearing and scaling the images once you found out what you want to do with them.

Jorn
Yes. The difficult part is the algorithm. ;-)
Dave Jarvis
yeah, good luck with that ;) -- I figured that was what you really needed, but since you mentioned the image transforming...
Jorn
A: 

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

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

rwong
@nwong: Unable to connect to the server.
Dave Jarvis