The effects of this tool are only visible at a preview scale of 1:1 or more. Use a detail window (click on the icon under the main preview panel) to inspect a part of the image, or zoom the main preview to 100% (also called 1:1) .
Photography is based on recording light which falls on a medium during an exposure. The medium is typically film or a digital sensor. The light signal recorded on the medium is not an ideal representation of the signal which fell upon that medium - these differences constitute noise. Film and digital photographs alike are susceptible to noise (called "grain" in film), however there are various types of noise from various sources specific to each medium.
In order to effectively deal with mitigating noise it is useful to understand what types of noise exist and where they come from. The topic of noise is well explained in this paper by one of RawTherapee's developers and physics professor at the Enrico Fermi Institute, Emil J. Martinec: Noise, Dynamic Range and Bit Depth in Digital SLRs
Light consists of packets of energy called photons. A digital sensor comprises of millions of light-sensitive elements called photosites (also known as sensels - sensor elements). Each photosite is capable of recording a signal from a certain range of photons - too few and the photosite will not register anything; too many, and the photosite will "clip" to pure white (completely overexposed). Think of it as a bucket collecting water - despite there being moisture in the air, if it doesn't rain then the bucket is empty, but if it rains too much then it overflows.
Note that the idea of "pixel" does not exist at this point yet - information from several photosites will later be combined into one pixel during a process called demosaicing. Also note that some sources do write "pixels" when they mean "photosites".
The physical sensitivity of the sensor is constant, however the photographer can amplify the recorded signal by modifying a setting you know as ISO (see the Film Speed article on Wikipedia). Since the signals recorded by the sensor are not perfect, using a higher ISO amplifies not only the desired signal, but also the noise. Sensors are susceptible to noise at every ISO level, however the higher the ISO the more apparent the noise.
There are different tools for dealing with different types of noise:
- The Noise Reduction tool is best at dealing with photon shot noise (Gaussian and Poisson noise) and film grain, and some sensor read noise.
- Sensor read noise and thermal noise are best handled by the Dark-Frame tool.
- Salt and pepper noise (sudden white or black pixels) is best handled by the Impulse Noise Reduction tool.
- Hot and dead pixels are best dealt with using the Hot/Dead Pixel Filter.
- Pattern noise (periodic, anisotropic) is best handled by the Line Noise Filter. You can also fix pattern noise (de-screen) after RawTherapee in GIMP, using the Fourier transform in G'MIC.
Regardless the source, noise will manifest itself as blotches of deviating color - "chrominance noise", and deviating brightness - "luminance noise".
- Chrominance noise is endemic to digital images, it is generally unattractive and something you will always want to remove.
- Luminance noise, on the other hand, looks like film grain and can be attractive, so it's not uncommon to want to remove chrominance noise but keep luminance noise.
Not everyone's requirement for good noise reduction is the same. Some like a completely clean, smooth result, while others prefer to have some grain left over to give the photo a more film-like quality. RawTherapee's powerful Noise Reduction tool caters to all your needs - it lets you eliminate noise while retaining detail. It uses wavelets, a Fourier transform and a median filter to work its magic. Read on to learn how to use it efficiently.
This section details the order of operations for removing noise.
- Start by ensuring you're using the optimal demosaicing algorithm. AMaZE is recommended for general RawTherapee use, however, when working with very noisy, high-ISO images, it is recommended to use the LMMSE or IGV demosaicing methods instead. AMaZE can lead to tiny maze-like artifacts appearing in very noisy images, whereas LMMSE and IGV are designed to prevent that from happening.
- Check the sharpening tools to make sure that you're not sharpening any fine detail, because your noisy photo has no fine detail! If you're using Contrast by Detail Levels or Wavelets, make sure that the first one or two fine-detail contrast sliders are at 0 to prevent these tools from amplifying noise.
- Zoom into the photo to 100% or more and find an area that has both sharp, in-focus parts as well as large, plain or out-of-focus ones, so that you have a good overview of the effects of the tool.
- Enable the Hot/Dead Pixel Filter if you notice salt-and-pepper noise (black and/or white pixels).
- Enable the Noise Reduction tool. Chrominance noise is automatically removed and usually does not require any tweaking. At this point the remaining noise looks more like film grain. If you are happy with keeping it then you are done, else keep reading.
- To remove luminance noise, set the Detail recovery slider to 0, and increase the Luminance slider until the noise has been smoothed-away.
- Increase the Detail recovery slider until you regain a satisfactory level of detail.
- You may notice some small artifacts remain from the noise reduction process. Use the Median filter to remove them.
- While it is generally not recommended to combine sharpening with noise reduction, RawTherapee-5.5 has a "contrast threshold" adjuster in the Sharpening tool, thanks to which you can sharpen details while preserving the smoothness of uniform, flat areas.
Enabling the Hot/Dead Pixel Filter eliminates the salt-and-pepper noise.
Closely examine large areas of strong saturation with fine detail - such as the pattern on a colored shirt or the petal of a flower - as you switch between the RGB and L*a*b* spaces.
The following images demonstrate the effects of various types of noise reduction, exaggerated for clarity. While the source image does not contain any very-low-frequency noise, it was chosen because it does display the effects (and side-effects) very well.
3.1.1 Color Space
Noise reduction can be performed in the L*a*b* and RGB color spaces.
When working in the L*a*b* space, the L* channel is used for luminance and the a* and b* channels are used for chromaticity.
When working in the RGB space, the Y from the CIE XYZ color space is used for luminance and (X-Y) and (Y-Z) are used for chromaticity.
There are two general noise reduction modes which control whether only high frequency or also low frequency noise is removed. Low frequency noise is noise whose blotches cover a large area; conversely, high frequency noise has smaller blotches which cover fewer pixels.
- Conservative - removes all except very low-frequency noise, so color detail is better preserved at the expense of not removing very large blotches. Use in most cases.
- Aggressive - removes also very low-frequency noise at the expense of being more aggressive with higher frequency noise. Use only on extremely noisy photos.
Gamma varies noise reduction strength across the range of tones. Smaller gamma values let noise reduction affect all tones emphasizing the action on shadows, while higher gamma values limit the effect to brighter tones only.
"Luminance control" lets you choose whether you want to manipulate the luminance noise reduction via sliders or a curve.
Adjusting the "Luminance" slider is equivalent to manipulating the amplitude of the luminance curve - both affect how strong the noise reduction effect is. The curve has the additional advantage of letting you control noise reduction strength as a function of the pixels' luminance - e.g. it allows you to have strong luminance noise reduction in the shadows and none in the highlights.
The "Detail recovery" slider allows you to recover structure while not reintroducing noise, unless you set this value too high.
Chrominance noise reduction can be performed using one of three methods:
- Automatic global
- Preview noise
The "Preview noise" indicator gives the estimated chromatic noise values after "Chrominance" processing:
- Mean: estimates the average noise value across all channels.
- High: estimate the highest noise value across all channels.
The three sliders and the curve act on the full image. You control the settings manually.
Controls the strength of chrominance noise reduction. Functions as an offset independently to the red-green and blue-yellow values. For example if master=50, red-green=-50 and blue-yellow=-50, the end result is 0; no effect.
Reduce/boost noise reduction in the red-green channel (a* in L*a*b*).
Reduce/boost noise reduction in the blue-yellow channel (b* in L*a*b*).
- Chrominance curve
The chrominance curve lets you control chrominance noise as a function of the pixels' chrominance - e.g. it allows you to have strong chrominance noise reduction in areas of low saturation and weak noise reduction in areas of high saturation. This curve modulates the "Master", "Red-Green" and "Blue-Yellow" sliders' action by multiplying their values by the curve ordinate. For example, if the master slider is set to 30 and the curve is at mid-height, the equivalent result will be about 45. It can be useful to boost noise reduction in grey or drab areas, as we distinguish noise more easily in areas of low saturation than we do in areas of high saturation. When using the "automatic global" noise reduction method, the automatically-calculated parameters are an average for the whole image, and they might be insufficient to remove noise in these low-saturation areas - the chrominance curve can help.
3.3.2 Automatic Global
The algorithm splits the image into multiple cells. For each cell the following are calculated:
- An average noise level for the red-green channel and the blue-yellow channel.
- A maximum noise level for the same channels.
This method is only operational when zoomed to 100% or more. It analyzes the areas currently visible in the preview (if you are zoomed to 100% or more) and calculates:
- An average noise level for the red-green channel and the blue-yellow channel.
- A maximum noise level for the same channels.
The three sliders - Master, Red-Green and Blue-Yellow - as well as the "Preview noise" values, are updated accordingly.
If you would like to keep the currently calculated values then you should switch back to "manual" method, else the values will be re-calculated when you pan or when you copy the profile to other images.
Use this filter to remove tiny, sharp-looking artifacts left-over from noise reduction.
- Median Type
The median filter replaces each pixel with the median value of its neighboring pixels. The contiguous group of pixels being sampled is called the "windows". This window slides pixel by pixel over the entire image. You can choose the size of this window using the "Median type" drop-down. The larger the size, the longer it takes.
Available window sizes:
- 3x3 soft: treats 5 pixels in a 3x3 pixel window.
- 3x3: treats 9 pixels in a 3x3 pixel window.
- 5x5 soft: treats 13 pixels in a 5x5 pixel window.
- 5x5: treats 25 pixels in a 5x5 pixel window.
- 7x7: treats 49 pixels in a 7x7 pixel window.
- 9x9: treats 81 pixels in a 9x9 pixel window.
Sometimes it is possible to achieve higher quality running several iterations with a small window size than one iteration with a large window size.
- Median Method
You have five methods at your disposal:
- Luminance only: works in the L*a*b* space, but only affects the L* channel.
- Chroma only: works in the L*a*b* space, but only affects the a* and b* channels.
- Weighted L* (little) + a*b* (normal): affects all channels in the L*a*b* space, but acts more weakly on the L* channel.
- L*a*b*: affects all channels equally.
- RGB: works in the RGB space, and the window size choice is limited to 3x3 soft, 3x3 and 5x5.
When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline. When using the RGB color space, it will be performed at the very end of the noise reduction pipeline.
You may wonder what other uses median filtering has apart from the elimination of pixels which strongly differ from their surrounding neighbors for aesthetic reasons. One of these benefits is a reduction in file size when saving to compressed formats such as JPEG and PNG. Median filtering removes variations which you will lose anyway if you downscale the image. You are also likely not to see these variations if you print the image. Removing them using median filtering can reduce the file size by even 40% (tested using JPEG compression strength 92 with "balanced quality" chroma subsampling), so give it a try if output file size is a factor.
Finally, the "chroma only" median filter method can be used as a complement to automatic chrominance noise reduction calculation - by reducing sharp outliers it can soften the calculated values, thereby avoiding fading out color detail too much.