Registration for HDR image alignment

Written by Paul Bourke
April 2006


Registration problem

This note discusses an approach for aligning multiple images by applying planar stretching (warping) to each one based upon manually selected registration points. The particular application demonstrated here is the alignment of multiple panoramic images for high dynamic range imaging (HDR), these images were drum scanned and so contained slight scaling, shear, and rotational errors.

The errors involved can be illustrated by taking two of the panoramic images to be combined into a HDR image and aligning them on the right hand side then (in this example pair) there is a rotation and a scaling error for objects on the left hand side. This can be introduced by film slippage in the image capture, stretching of the film, variation in the drum scanning. This obviously needs to be corrected if multiple images are to be combined into a single HDR image.

 

Image registration

In the following two images, the second is to be aligned to the first. Sharp features are identified in the each image (blue guide lines in Photoshop), these form a polygon (red lines). The pixel positions are recorded for each of the 4 points. The second image is automatically warped so that the polygon in the second image becomes aligned with the polygon in the first image. Before alignment features in the second image were misaligned with respect to the first image by up to 50 pixels.

The result was registration of image features to at most a 2 pixel error (worst case) over 10,000 pixel image width over the whole image frame. Difference between images before and after the registration illustrated by subtracting the two original images and the registered images.. Note that one doesn't expect total black because these are taken with different exposure settings, the images were equalised before differencing to reduce this variation. The important feature is the lack of outlines in the differenced image after the registration.


Difference before registration


Difference after registration.

More extreme example: test case


First image.
 
Second image.
 

Second image warped to align the registration regions shown as black border. The registration region in the first image need not be rectangular as shown in this example. Blue region is not defined, out of bounds in second image. Used standard supersampling antialiasing.