Long Exposure Noise Reduction “in Post”

Many digital cameras have a very effective built-in feature for removing “hot pixel” noise from long exposures. They shoot another dark frame after the image exposure, just to capture the hot pixels, then they somehow “subtract” the hot pixels from the first image, and give you a clean, noise-free picture. This bit of magic is called Long Exposure Noise Reduction (LENR).

Two 8-minute exposures, the first with LENR off, the second with it on.

LENR is great, but it’s not practical if your plan is to build an image of star trails from a series of 10 or 20 exposures, each 4 or 5 minutes long. You can’t have lengthy pauses while your camera captures dark frames, or your star trails will end up looking like Morse Code. You have to take the noise and work with it in post-processing. The spot healing brush in Photoshop removes hot pixels very nicely, but if your image contains several hundred to a thousand or more hot pixels, removing them one-by-one is tiresome, and you’re bound to miss some, or just give up in frustration.

So after some research and some experimenting, I’ve come up with a way to remove nearly all the hot pixels at once, in Photoshop, that is easy and effective.  You just have to plan ahead for it while you’re shooting.

A 640 x 200-pixel area from stack of ten 4-minute exposures, shown here at 100% scale. LENR was off and hot pixels were not removed in post-processing. Lots of noise!

The same area as above, with hot pixels reduced in post-processing. Hardly any noise!

Here’s how to do it (I will assume you are experienced in raw file processing and comfortable using layers and masks in Photoshop):

1. Take a series of exposures looking at a star-filled sky (typically 4 or 5 minutes long, at the camera’s native ISO—200 for most Nikon SLRs or 100 for most Canon SLRs—and near the widest aperture for your lens, and with all camera settings on manual). Consecutive exposures should have no more than 3 to 5 seconds between them, to avoid visible gaps between star trail segments—a programmable intervalometer makes this easy to do.

2. After you finish the series of star trail exposures (or before you begin them, or both), expose a dark frame to capture the camera’s long-exposure noise only, with no other image. To do this, cover the lens with its lens cap, make sure focus and exposure are set to manual (they should be for the star trail photos anyway), and expose another frame.  Ideally the exposure should be of the same duration as one of the individual exposures in the sequence, but I’ve found (with my Nikon D700—other cameras may vary) that a noise-exposure as short as 1 or 2 minutes can be used if the hot pixels are brightened substantially in processing the raw file to resemble those in the full-length exposure.

3. Assemble you star trail image. Briefly, this involves processing each of the raw files identically, loading them into layers in Photoshop, setting the blending mode for all the layers above the bottom or “background” layer to Lighten, and making any further adjustments or edits (other than hot pixel removal) you may want. Keep this file open while going to the noise-only image.

4. Process the hot pixel image in a manner that brightens and slightly expands the hot pixels without accentuating background noise.  Be sure the background between the hot pixels remains a smooth, even black (you will be selecting this area later).  View the image at 100% as you are making these adjustments (the more you zoom in, the more really small hot spots will become visible). The settings I’ve used (in Lightroom) are: Exposure: +4.0, Blacks: +1 or +2, Brightness: +150, Contrast: -50. Export this image so it can be copied into the stack of star trail layers in Step 7.

Hot pixels only—brightened a bit, but keeping the background black.

5. Now back in the star trail image, either (1) flatten the image down to one layer AND duplicate the flattened layer, OR (2) create a new layer at the top of the stack by selecting all, copying merged, and pasting into a new layer. Whether you flatten/duplicate or copy-merged/paste, make sure the new merged layer is above all the others and perform the next step on this new layer.

6. Select all on the new layer, zoom in to 100% so you can see all the hot pixels clearly, and apply the Median filter (Filter>Noise>Median) with a radius just high enough to make all of the hot spots disappear (probably 3 to 6 pixels). The star trails will be mostly visible still, but blurred.

The Median-filtered layer.

7. Open the hot pixel image and copy it to the top of the star trail image, right above the layer smoothed out by the Median filter. Close the hot pixel image.

8.Using the Magic Wand Tool with the tolerance set to zero or 1 pixels, select the black space between the hot pixels. Invert the selection. Optional at this point to ensure good coverage: expand the selection by 1 pixel. Keeping this selection active, go down to the Median-filtered layer in the Layers panel, make that layer active, and click the “add layer mask” button (or in the menu, Layer>Layer Mask>From Transparency). A mostly black mask will appear on the median-filtered layer.

The Median-filtered layer masked by the selection of hot pixels (the white areas will be transparent in your Photoshop layer).

9. Turn off the hot pixel layer. You don’t need this any more.

10. Zoom in and be impressed with the results.  Turn the Median-filtered layer on and off for a before-and-after comparison. Using the median filter blurred out the hot pixels. Selecting the hot pixels and using that selection to make a mask on the Median-filtered layer allowed it to cover only the hot pixels.

The results are impressive, but not perfect. There may be a smattering of hot spots that appeared in just one of the star trail exposures, but not in the noise-only exposure.  Most hot pixels will repeat consistently from one exposure to another over the period of an hour or more. But most exposures will have a few hot pixels that don’t appear in the other frames, including the noise-only exposure.  Some of these can be removed easily with a small-diameter Spot Healing Brush Tool, if necessary.

It’s also a good strategy to go someplace cold to shoot star trails.  Long exposure noise decreases quite a bit at temperatures near or below freezing.

There is, of course, one simple way to avoid all this fuss completely: just shoot film!

Tim Messick Photography • Graphics
Copyright © 2011 Tim Messick. All rights reserved.

About Tim Messick

Photographer, cartographer, and botanist/naturalist. Home is in Davis, California. Home-away-from-home is the eastern Sierra Nevada. Compiling a flora of the Bodie Hills.
This entry was posted in Photography, Photoshop, Tutorials and tagged , , , , , , . Bookmark the permalink.