Imaging Technology Center

Digital Imaging- Registration

by Gary Nolan


Many times, a technique for perfectly aligning or "registering" digital images is required to extract information about a subject which changes against a static background. An example of this scenario might be an experimental flame burning under microgravity conditions, spreading and changing size relative to an unchanging test stand. Given that most scanners have no means of physically registering film, it is usually necessary to post-process all files so that a "landmark" present in all frames of the original film resides at exactly the same X,Y coordinates in the resulting digital files. The benefits of such image registration include straightforward image calculations (such as a background subtraction) and valid distance measurements based solely on coordinate location in any given file in the series.

The following technique outlines a simple, manual approach to this problem and utilizes the image layering capabilities found in recent versions of Adobe Photoshop(TM). Various other imaging packages could also be used to achieve the same result.

Original Image
Original

To best see this technique at work, start by opening two copies of the same file. Select one entire image using the "Edit->Select All" command. Then, using the "move" tool, drag one version of the image on top of the other so that it appears above the base image on a discrete layer. The location of this moved image is unimportant for now. With the top layer active, invert this entire layer. This layer should now have the appearance of a "negative" of the original. Next, you need to change the opacity of that layer to 50% (slider or pull-down in the "Layers" palette), so that it has a transparency allowing you partially "see" through to the layer below.

Inverted Image
Inverted

Again, using the move tool, manually drag the top layer around over the base layer in an attempt to get a rough alignment. You will notice that much of what you now see is 50% gray (value=128), indicating that the base and top layers have exactly inverted values at those points and are effectively cancelling each other out. When you have a rough alignment, zoom the image to 100% magnification so you are viewing a true 1:1 file pixel to screen pixel representation. For precise alignment, use the arrow keys to gently nudge the top image over the base image. The goal is to see only a solid 50% gray value throughout the entire file, indicating that the base layer (positive) and top layer (negative) are exactly aligned and "registered".

Overlaid Image
Overlaid

As an aside, you will have noticed that the edge effects seen as the images are close but not precisely aligned are similar to an embossing effect. In fact, this is similar in result to an "emboss" effect created both with digital image filters and conventional films and can be a starting point for other artistic effects.

Aligned Image
Aligned

Now that the files are aligned, change the opacity of the top layer back to 100% and invert it back to its original appearance. "Flatten" the image to effectively remove the base layer and then save the registered file with a different name. This last step would be required in a production series, but is not really necessary since we began with two identical images.

Note that in a production series, the goal would be to align or cancel the "landmark(s)" that do not change in each of frames. Also, it is desirable to identify one image as the "master" to always be used as the base layer to register all other images against. Last, this technique does not account for any rotational differences between scans (the subject of another article I'm sure).

This general technique has been used in varying forms for several years at the Imaging Technology Center, particularly in support of microgravity flight experiments (produced by "drop-tower" packages and flown aboard shuttle flights). For high resolution digital images from most commercial scanners, it is one way to guarantee frame by frame alignment with pixel to pixel accuracy.

Skip footer navigational links and return to main content

[LTID Home] [GRC Home Page] [LTID Site Map] Links

ITC Home

[Privacy Policy and Important Notices]

Responsible NASA Official: Sharon.R.Webber@nasa.gov
Web Curator: James.W.Polaczynski@nasa.gov (Wyle)

Last Updated: 11/7/2008