TGP September 8, 2008
RSS

Created and Maintained by:
The Photoimaging Information Council
SEARCH TGP
Articles








Enter Your E-Mail Address:
i want to unsubscribe
Submit
We respect your privacy and will NEVER send you SPAM e-mail or sell your information. That is our Guarantee to you.


 
Dark Frame Subtraction using Adobe Photoshop
by Chris Limone

Dark Frame Subtraction using Adobe Photoshop<br>by Chris Limone   

Dark Frame Subtraction using Adobe Photoshop
by Chris Limone

If you shoot long exposures digitally, you should get into the habit of shooting with the lens cap on. That's right, shoot a dark frame at the beginning or end of every day you shoot so that you can easily remove any hotpixels that might show up on your images.

Article rating: 8.59


When shooting long exposures at night with a digital camera, you may have noticed little white (or red, blue, or green) specks on the image (if you haven’t noticed, zoom in to about 400% and you’ll see them). These hot pixels are completely normal when using shutter speeds of 2 or more seconds. The CCD sensors have not been perfected and as of yet there is no way to avoid this. Most of the time you will never see these defects even if you do shoot long exposures. The reason is simply that you won’t zoom in far enough to see them. But if for some reason you want to print very large, or enlarge and crop an image, these little spots will become apparent. So if you love shooting at night, or with long exposures, let me show you an easy way to get rid of these annoying little dots.

There is a well-established method of removing these hot-pixels called “dark frame subtraction”. If you take a long-exposure with the lens cap on, you would think you should get a completely black image, right? Nope. What you get is something that looks more like the sky on a starry night. This is the “dark frame”. Hot-pixels don’t always stay in the same spot, but all images shot within the same day should have approximately identical hot-pixel locations. Also, the longer the exposure, the more of these little dots will show up. Thus, if you’re going to do a dark frame subtraction, you need to shoot a dark frame with the same exposure as the image you wish to edit, and you need to shoot it within the same day. It's much easier to shoot the dark frame directly after the original photograph instead of trying to remember what exposures you shot earlier in the day.

There are some freeware and shareware programs you can download that will do dark frame subtraction with or without a dark frame (links to these programs are at the end of the article), but I am going to show you how to do it manually in Adobe Photoshop.

treeroots 200
Original Image: 15s at f/6.7
darkframe 200
Dark Frame: 15s with lens cap on

This is an image I shot recently to illustrate this concept. You can’t see any hot pixels at this level of magnification, so I am going to zoom in to where the blue box is shown (400% magnification). It’s worth noting that no color correction has been done to the image, in camera or in Photoshop. In-camera color correction must be turned off to get the dark-frame image, so you should also shoot the main image with any color correction settings disabled.

treeroots 400percent
darkframe 400percent
Close up of the area in the blue box

Here I have my original image with a couple hotspots next to the dark frame image file (shot immediately after the original). You can compare the two images to see how the hot-spots look similar. On my dark-frame image there were about 20 of these hot pixels. I shot these images with a Canon 10D. Most professional and semi-professional camera models have better CCD sensors and therefore fewer hot pixels. The consumer point-and-shoot cameras tend to have much more of these if the camera is capable of taking long exposures.

Open your dark-frame image and the original image in Adobe Photoshop. With the dark-frame image window active, select all (Ctrl-A) and copy (Ctrl-C). Then go to the original image window and paste it in (Ctrl-V). This should place it directly over the original image onto a separate layer so both are aligned correctly.

subtraction1

Select the dark frame layer and change the blending mode to “Difference”. This will get rid of the hot-pixels by inverting the image only where the dark frame is not black. You can change the opacity of the dark frame layer to find a better balance if the difference is too much. Usually 50% opacity works well.

subtraction2 16percent

Here the dark frame layer is set to 16% opacity. Notice the red hot pixel on the left has disappeared.


subtraction3 50percent

Here I have set the opacity to 50%. The hot pixel on the right blends in a little better, but the red one on the left has turned green. Upon earlier inspection when searching for hot pixels in the dark frame image, I noticed there were more blue or red patches than there was white. So, I’m going to go with the lesser of two evils and set my dark frame layer’s opacity to 16%. This should get rid of all the colored hot pixels.

Now, if you’re finished fussing with the dark frame subtraction method, you should flatten the image.

subtraction4 flatten

At this point you can do any color correction or photo-editing that you’d like. I just did a color balance adjustment to get the final image.

1 final image




These programs from Media Chance are available to try for free. More information is available at the Media Chance website.

Blackframe NR uses an advanced algorithm to get rid of hot pixels which means you don’t have to choose the lesser of two evils, it will get rid of both colored and white hot pixels in one try.

Blackframe NR
blackframe

www.mediachance.com/digicam/blackframe.htm


Hotpixels Eliminator works somewhat like Adobe Photoshop’s Dust and Scratches filter and it’s a good choice if you do not have a dark frame.

Hotpixels Eliminator
hotpix1

www.mediachance.com/digicam/hotpixels.htm

^ Back to top


Related Links
www.chrislimone.com

Rate This Article
Rate this article from 1 to 10
12345678910
poorgreat

Comments About This Article
isn't this process outdated now, since most Digital SLR cameras have a 'long exposure noise reduction feature' which basically does the same thing in camera if enabled

Posted by: Joey Oct 26, 2007 @ 5:35 PM EST

good article

Posted by: vksgautam Mar 3, 2008 @ 1:11 PM EST


Post a Comment About This Article
* Your Name:
* Email address:
   (Enter the code shown)
(Your e-mail address will not show on the site
and is used so that we can contact you back if needed)
* Your Comment about this article::
Include me in the TGP Monthly Newsletter
 


















 

© 2002 - 2008 Take Great Pictures
Design by FLASHcap.com