Stacking Images in Photoshop


Cropping to Match Image Size



In order to stack images in Photoshop each image must be exactly the same size. The easiest way to accomplish this in Photoshop is to choose a star close to the upper left hand corner of each image to be stacked (the same star is to be used on each image). Next open the Window menu and choose Show Info in the Palettes sub menu. Using the crop tool, click on the chosen star (zoom in for greater precision) on the first image and drag the tool to a place close to the bottom right corner. The Show Info window will count the number pixels in both the x and y directions as you drag the crop tool across the image. At the end of the crop drag, note the pixel count in the Show Info window and use this value to crop the other images that you want to stack. By starting the crop each time on the same star and ending with the same pixel count, you will insure that each image will be of the same area and the same size.


Registration with Layers



After you have scanned and cropped your images (we usually scan them as tiff files), reopen them in Photoshop. With one of the images you will need to create a layer. To do this, select one of the images, open the Window menu and go to the Palettes...Show Layers sub menu. Create a layer and while it is still active, select the other image, copy it and paste it to the previous image's active layer. If you select Difference in the Paste Layer dialog box it will be very easy to see when the two images are in registration as you will get a totally black screen when exact alignment is achieved.

To register the images open three windows on the same composite image, and zoom in on the left top of one, the center of another and the lower right corner of the third. Movement in any one window will be seen as movement in all the others. Now, move to the window that is zoomed in on the center of the photo. Use the arrow keys to register the stars in the exact center. Next use the Rotate: Arbitrary under the Image menu and experiment through trial and error until you get the stars registered in the windows zoomed into the corners.

Many things can conspire to make two images to not be exactly in registration, even though they were shot with the same instrument on the same night. Such things as focal length change due to temperature change and emulsion swelling due to high humidity can make it very difficult, if not impossible, to perfectly register two images. Another factor that can cause head aches in registration is field rotation. When stacking multiple images it is absolutely necessary that polar alignment be as accurate as possible. While each image individually may not show field rotation, the effect will accumulate over the duration of the total number of exposures to be stacked. One of the authors made two, one hour exposures of the same object that were separated by a two hour period of cloudy weather. While each individual image showed no sign of field rotation, when stacked, it was quite plain that the two fields had rotated relative to each other. The amount of rotation, in this case, was the same as what would occur on a single 4 hour exposure!


Stacking the Images



At this point your two images are in register and can be stacked using a number of different methods, the reader is encouraged to experiment! What follows are two different approaches, one developed by Jerry Lodriguss and the other by the authors. First is the method of Jerry Lodriguss:

After the images are registered, go to the Layers Palette, and change the method that they are combined to Multiply [from Difference] (or overlay...you get different histograms, multiply has a greater range of pixels on the histogram, but it depends on the original scan). Then Flatten the image to combine the two layers (flatten command is under the small right pointing arrow at the top right of the layers palette).

The authors have achieved good results adding the images. This function is found under the Image menu in Apply Image. Note that Add is not an option in Layers. With this method the registered layer is copied to a new file and saved [as] a copy in the tiff format. The original layer can then be deleted. Note that Save a Copy is a specific option under the File menu and is the only way that will allow you to save an image in formats other than Photoshop. What you have now are three images, the two originals plus a registered version of one of the originals. The original image, that was subsequently registered and copied to a new file, can now be closed. At this point you will Add the registered image to the remaining original using the Apply Image...Add function found under the Image menu. Note that Opacity should be set to 100%.


Masking



Sometimes highlight areas that look fine on the original images will block up when the images are added. This situation can be corrected by masking the images before adding them. The degree of masking (or, how dense should the mask be) is a hit and miss proposition and will probably require a number of trials before just the right amount of masking is achieved. Fortunately making masks is relatively easy in Photoshop, especially when compared to doing them the old fashion way, in the darkroom!

To begin, open one of the images to be added and make a copy. With the copy active go into the Mode menu and change the image to Grayscale. Next open the Image menu and go to Map...Invert, this will produce a black and white negative of the original image. At this point experimentation starts. The idea is to lower the contrast on the mask until its effect is only on the desired highlight area of the original color image. The mask is created by first opening the Image menu and proceeding to Adjust...Brightness/Contrast and using the Contrast slider to lower image contrast. How much? Each image is different, you will have to experiment! Next the mask needs to be blurred to such an extent that all stars are rendered invisible or nearly so. To do this, use the Blur tool under the Filter menu. Note that the brighter stars may have to be removed using the pencil, paintbrush or eraser tools. Once the MASK is completed then it is applied to each of the original color images using the Multiply funtion in Apply Image (there is no need to make a mask from each of the originals), and finally the color originals are added to one another.


THIS MATERIAL IS FOR PERSONAL USE ONLY This material may not be quoted or used for any purpose without express consent of the authors: Brad Wallis and Robert Provin
Return to Photoshop Stack Illustration. Return to Hints Page.