Dark-frame subtraction is a method of dealing with thermal, dark-current and fixed-pattern noise. It is not effective against high ISO noise because of its different random nature. In long exposure shots (more than 1 sec) the non-homogeneous thermal noise becomes evident, mainly due to unevenness of the sensor and surrounding electronics. A method to mitigate this effect is to subtract one (or more) shots taken in the same conditions, but with the lens cap on. Only raw images for the same camera model can be used as dark-frames, preferably taken around the same time as the photo they are being subtracted from. As taking a dark-frame shot is simply a matter of putting the lens cap on and pressing the shutter without changing any settings, this is not a problem.
In the "Dark-Frame" panel, you can specify a single shot to subtract from the image, or check "Auto-Selection" and let RT choose the best match from the directory specified in "Preferences > Image Processing > Dark-Frame". Under the widget, RT shows how many shots are found and how many groups of shots are found and averaged into a template. From now on, put your dark-frame shots there if not already done. You could also move a shot from the "File Browser" tab into the dark-frames directory by right-clicking on it and selecting "Dark-Frame > Move to dark-frames directory". RT chooses the best match looking for the same camera model with minimal difference in ISO, exposure duration and date. If more than one shot with exactly the same properties is found, then an average of them is used: this produces by far less noise, so it's better to have 4-6 frames taken in the same conditions of the actual photo.
When selecting a dark-frame (or with "Auto-Selection"), RawTherapee extracts from it all the positions of hot pixels and then always corrects them in the final image. This correction is better than applying only the "Hot/dead pixel filter", but works only for hot (=white) pixels not for dead (black) ones.
Key for dark frames (dfInfo::key):
- camera manufacturer
- camera model
- shutter speed
The search for the best match is two-fold:
- if perfect matches by key are found, then the list is scanned for lesser distance in time,
- otherwise if no match is found, the whole list is searched for lesser difference in ISO and shutter.
RawTherapee can correct a list of bad pixels (pixels that are always black or white or stuck at one color) for your particular camera model. To do this, you need to write a text file with the absolute raw coordinates of these pixels: each line specifies a pixel with x<space>y<return> positions.
Important: RawTherapee cuts 4 pixels from the top and left raw file's border (because they can't be interpolated correctly). If you look at the pixels coordinates in RawTherapee, beware of the offset introduced by this cutting. You must add +4 to each coordinate.
The file has to be named exactly as your camera: "make model.badpixels" ("make" must be the short name), e.g.:
If you have two cameras of the same model you can also specify the serial numbers (look at the Exif data), e.g.:
maker model serial.badpixels
The file has to be located in the "dark-frames" directory specified in Preferences.
Pixels in the bad-pixels list will always be corrected in processed photos.
Bad pixel detection software
Programs exist to aid in the detection of bad pixels:
- Dead Pixel Test
- Pixel Fixer
Remember to fix the 4px cutting offset if you use them.