Imaging Glossary › Dark Frame
Cameras & Sensors

Dark Frame

What the camera reports in total darkness

View
Definition

An image captured with no light reaching the sensor, at the same exposure timeLoading... and gain as the images it will correct. Even in total darkness a camera reports a signal: a fixed offset (also called the bias or pedestal) that keeps noise from being clipped at zero, a small dark current that grows with exposure and temperature, and pixel-to-pixel patterns that stay the same from frame to frame. Averaging many dark frames gives the offset; the frame-to-frame spread gives the read noiseLoading....

In flat-field correctionLoading... the dark frame is subtracted from both the image and the reference before dividing. Leave it out and dim, heavily stained areas are under-corrected. Capture it with light leaking in — room lights on, a light path that is not fully blocked — and too much is subtracted, over-correcting them the other way.

What a camera reports in the dark

Three things appear in an image taken with no light. The offset, also called the bias or pedestal, is a fixed value added on purpose so that noise around zero is not clipped; on scientific CMOS cameras it is often set around 100 counts. Dark current is charge generated by heat, which grows with exposure time and temperature; cooled cameras keep it small. And fixed-pattern structure, pixel-to-pixel differences in offset, stays the same from frame to frame.

Averaging many dark frames gives each pixel's offset; the frame-to-frame spread of each pixel gives its read noiseLoading.... Neither is light, and both must be removed before any calculation that treats pixel values as proportional to light.

Simplified

Even in total darkness a camera reports something. Part of it is a fixed number the manufacturer adds on purpose. Part of it is a faint signal from heat, which builds up with long exposures. And a few pixels always read a little higher or lower than their neighbors.

None of that is light from your sample, so it has to be removed before the numbers are used for measurement.

Capturing one properly

Use the same exposure timeLoading..., gain, readout mode and camera temperature as the images the dark frame will correct. Block all light: lamp off or shuttered, eyepiece shutter closed, and room lights low, since light can reach the camera through the eyepieces. Average several frames, at least 16 for a correction frame, and around 100 if you also want a read-noise measurement.

Re-capture when exposure, gain or temperature changes. A dark frame from a different exposure carries the wrong dark current, and one taken with stray light in it subtracts too much.

Simplified

Take the dark picture with exactly the same camera settings as your real ones, but with no light at all: lamp off, eyepieces covered, room lights dimmed. Take several and average them.

If you change the exposure or other camera settings, take a new one. A dark picture taken with room light leaking in removes too much and causes the opposite error.

Why skipping it hurts the darkest pixels most

The offset matters little where the image is bright and a great deal where it is dark. Worked: with an offset of 100 counts, blank glass at 2,000 counts and a strongly stained pixel at 300, the true values are 1,900 and 200. The correct optical densityLoading... is log10(1,900 ÷ 200) = 0.98. Without the dark subtraction it comes out log10(2,000 ÷ 300) = 0.82, about 16% low.

The error grows with stain strength, so it compresses the top of the range, exactly where strong and very strong staining are told apart. In flat-field correctionLoading... it also biases the division, leaving the darkest corners under-corrected.

Simplified

The camera's built-in extra signal hardly matters in bright areas, but it matters a lot in dark ones. In a strongly stained spot, it can be a large share of the reading.

Leave it in, and dark, heavily stained areas look lighter than they are, by about 16 percent in a typical example. Strong and very strong staining start to look alike, which is exactly the difference you were trying to measure.

Share This Term
Term Connections