< ! --Digital window verification 001 -->

Guest post: Dark Frame Subtraction

Pin It

This guest post on Dark Frame Subtraction was written by Paul Marchant:

It is often true that some of the best ideas come from end users that feed the product roadmap get features implemented.  Two worthy ideas for consideration are:

  • Self calibration of dark frame subtraction for noise reduction
  • Exporting calibrated dark frame images for raw post processing

Both CMOS and CCD digital camera sensors that convert light into electrons produce small varying amount of ambient noise that affects the image each the sensor generates however it is only really noticeable with longer exposures lasting more than 5 seconds or so that can be set on most DSLRs and many hybrids.

The characteristics or signature of every camera’s sensor is slightly different although in simplest terms the principle factors that directly influence the amount of noise generated:

  • The camera’s ISO setting that amplifies the sensor’s sensitivity
  • The ambient temperature of the sensor (how long the camera has been switched on for)
  • The length of exposure

To reduce noise in long exposures, Digital SLRs employ a technique known as dark-frame subtraction in which the camera takes a second dark/blank frame to measure the sensor’s own noise then subtracts it from the image.  The disadvantage with this technique is that it requires the camera to mimic the original settings but taking a second frame but with the shutter closed.  The subtraction of the original image and the noise generated from the “dark image” leaves a much cleaner picture however the result is an exposure that is twice as long as it should be.  The alternative is to switch off noise reduction, shoot in RAW and use post processing software to clean up the image.

I propose that the next generation of DSLRs incorporate self-calibration functionality that allows each camera to cache a series of dark frames in memory with various ISO settings and exposures.  A cached dark frame can be immediately applied eliminating the need for a second hidden long exposure and would allow for continuous shooting. Photographers would also have access to calibrated frames on their memory card enabling a much simpler post processing workflow using the camera’s own data that reflects the unique characteristics of its sensor.   This would require the camera to save the sensor’s temperature in EXIF data to ensure the corresponding cached frame is applied with interpolation to correlate differences.   Hot spots generated by cosmic radiation or ambient noise could be eliminated by capturing multiple dark frames if require.    I believe the camera manufacturer that implements this technique in real time will capture the market in long-exposure / astrophotography.  I could certainly have used this technique when taking long exposure lightning shots!

This is the response that I received from Nikon when I forwarded this idea to their product management team several months ago - who knows, Nikon might yet adopt this technology and announce it on August 24th 2011:

Dear Paul ,

Thank you for your email.

We appreciate your feedback. I will forward your feedback to our 'design and quality' team for future review. Please bear in mind that this will not result in any direct feedback from Nikon. Please keep an eye on our website for future product releases that may include such a feature. Product updates and firmware updates are not implemented on demand unfortunately and it is up to the discretion of the design and quality department on what to implement in any future updates. I apologize for any inconvenience caused by this.

Should you require further assistance please do not hesitate to reply to this email.

Kind Regards,

Nikon Europe Support

More information on dark frame subtraction including an explanation of other factors that can influence image quality can be found on:

This entry was posted in Other Nikon stuff and tagged . Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • EvanK

    I ALWAYS shoot darks for astrophotos, it would be interesting to see that feature integrated into the cameras.

    • Fx Fan

      The lack of options of how the low level internal sensor data is processed has been a feature that Nikon needs to pay more attention to.

      As it is not only how the dark frames are acted upon but also in what form the
      output data from the sensor is stored into RAW and what level of DSP processing that may be applied prior to this storage.

      This need is not only in low light applications such as Astronomy but also a
      issue in some technical imaging data collection.

    • Banned

      I feel that’s too many variables to consider for a cached version to be any useful. I don’t see Nikon taking a chance with this.

      At least if it’s implemented you want to make sure everybody knew it was your idea, hence this post?

  • Bonetti

    Didn’t t nikon d100 use this technique when the long exposure noise reduction was on????

    • VJ

      Yes, the D100 uses dark frame subtraction… and I thought all DSLRs used this…

  • Mike

    Are we still worrying about noise? What is it, 2005? Have you not realized that noise does not ruin a picture and can actually enhance it? Remember, people like looking at photographs and noise reminds them that is what they are looking at. If you want a crystal clear image, use your eyes, not a camera.

    • BartyL

      I can see that some luminance noise can add ‘character’ to certain types of shot, but not for astrophotograpy, which is the author’s interest. Astrophotography (deep field anyway) is all about striving to bring out the best from very faint light sources, and electronic ‘grain’ is not an asset!

  • Achille Calegari

    Sorry Paul Marchant, cameras have been doing that procedure with “Long Exposure Noise Reduction” on for years now, my D80 did the exact same thing and I guess the D70 did the same.

    Nothing new exept the fancy names.

    • human tripod

      You need to read it again. He’s suggesting using a cached image instead of a second image captured while you wait. It’s a good idea.

      • iamlucky13

        Bingo. He’s proposing an enhancement to an existing feature.

        When you’re out shooting on a cold night, and you have to follow up a multi-minute exposure by waiting an equal length of time for the dark frame to expose, it’s a nuisance.

        There’s been a recent trend of long-exposure time lapses, too. If you have to wait for dark frames on every one of them, you’ll have gaps.

        And as far as “fancy names,” Nikon is the one coming up with fancy names. It’s been called “dark frame subtraction” by astronomers long before it was a feature of DSLR’s.

        BTW – anecdote about temperature. At one point I packed up and headed inside the moment my camera finished the first exposure. The camera then warmed up during the dark frame exposure. This led to more noise in the dark frame than in the original exposure.

        The result – black spots where noise that only existed in the dark frame had been subtracted from the original.

  • http://go-dslr.com flosse_r

    Actually you can do this already. Set the ISO settings you will shoot with, focus, switch to manual focus, add the lens cap and shoot an exposure. Then remove the lens cap and switch to autofocus andshoot. now you ave the reference dark frame that you can use in photoshop, you can shoot and turn noise reduction off and then use the referenced dark frame. I agree this would be awesome in-camera and am wondering why none is doing that yet but the extra steps aren’t hugely complicated anymore either…
    IMHO…

  • foo

    Old idea. Intel already has a patent on caching dark frames (U.S. Patent #6061092. Dec 1997).

    The problem is the need for a ton of memory (probably hundreds of GB) for the caching to be effective.

  • Boyan

    This is kind of obvious, many of us already do it manually. When I know I will be shooting long exposures I turn off NR, shoot a few images with the cap on that bracket the anticipated range of exposures at the beginning AND end of the shoot and then substract manually with a layer in PS. I must say that the newer breed of cameras is getting good enough so that even exposures at ISO=1200 and 30-60s do not suffer appreciably from FPN.

    The problem with the idea as stated is the caching of the images. This would require on-board NVRAM, not particularly difficult but would certainly add meaningful cost and complexity. Only few users would appreciate such a feature, so I seriously doubt Nikon would implement it if it would put them at a cost disadvantage without a serious impact to the broader user base.

  • http://liquidinplastic.com Dan Newton

    The temperature of the sensor is affected by more than just the length of time that the camera is turned on. I see a major noticeable difference in noise doing long exposures on a summer night versus a winter night as an example.

    Cool idea, but there are way too many variables involved for this idea to work.

  • Jonas

    Dark frame subtraction DOES NOT reduce noise, the noise in the images is random. Dark frame subtraction DOES however remove hotpixels and sensor heat (rare these days).

    Those of you who don’t believe this can set your is to max and shoot a few pics off something, the “grainyness” you see is noise, it is not the same in any image, so it is impossible to remove the noise of one image by subtracting it randomly with another one.

  • David

    Take several exposures (with less integration time to avoid “thermal” noise) and then average them as it is done is professional astrophysics with professional cameras and forget the dark images. They are not meant to remove noise but inhomogeneities on the CCD (or what ever).

  • craigc

    Isn’t this just called black balancing in motion capturing with regard to CCDs? Higher end cameras ( larger bodies with more processors ) allow the user to perform a Black ref check, that also looks at hot spots as well as calibration of all the RGB chips. True that most motion cameras are set at a lower ISO around 300 to 800, however heat due to long recording times and longer shutters has the same effect of adding noise correct?

  • Jafu888

    As you said, the noise is dependent on: ISO, ambient temperature, exposure time.
    If we choose 4 ISO, 10 temperatures and 10 exposure times we have 400 images difficult to compress noise images. Say 12 MPix (About 12 MB) .

    Total you need to have a 5 GB of extra data around.

    This may change with time. So the camera would have to recalibrate itself.

    I am not sure how this could be made to work.

  • francd

    Substracting layers in PS will not give you the exact result of Dark Frame Substraction. You need to do this at Raw level, before any other processing.

    There are a few Raw processors that allow to do this: DCRaw, RawTherapee, or astrophotography software like IRIS.

    The reason is that output images in tiff or jpeg are gamma encoded.

    (signal+noise)^1/g – (noise)^1/g =/= signal^1/g

  • Back to top