About Noise Reduction: Difference between revisions

From RawPedia
Jump to navigation Jump to search
No edit summary
No edit summary
Line 106: Line 106:




==Denoise avec « Local adjustments »==
==Denoising with « Local adjustments »==
 
===Steps in the process===
 
(in the order they appear in the menu)
 
====Aggressive / Conservative mode (uses wavelet processing)====
The "aggressive" setting is not necessarily more destructive than the "conservative” setting. It all depends on the Strength settings for both luminance and chrominance. In some cases two passes with a lower Strength setting will lead to a better result. However, the processing time will be significantly increased in this case.
 
====Luminance denoise by level (uses wavelet processing)====
the abscissa ("x" axis) represents the levels of decomposition (from 0 to 6, left to right). The y-axis represents the amount of denoise applied at each level.
 
====Luminance detail recovery (DCT f - Fourier transform & wavelets)====
this slider uses the Fourier transform to take into account the difference between the L (Lab) component of the wavelet-denoised image and the original image. It is important not to set this slider to zero because in this case, the Fourier transform will have a very strong effect on the noise and prevent the 3 equalizers from having any real influence. The more the slider is moved to the right, the weaker the DCT action will be and the more the details will be apparent.
 
====Equalizer white-black (uses data prior to wavelet processing)====
This slider corresponds to the luminance curve of the Noise Reduction module in simplified form. It allows you to focus the action on either the dark or light tones of the image. The action of the “Luminance denoise by level” curve will be modulated according to the position of the slider.
 
====Denoise hue equalizer (uses data prior to wavelet processing)====
This curve allows you to increase or reduce the action of the "luminance denoise by level " curve as a function of the  color (hue) of the image, .
 
====Denoise based on luminance mask (uses data prior to wavelet processing)====
* the mask in "mask and modifications" (Blur & denoise ) must be activated.
* one or both of the two curves L(L) - LC(H) must be activated.
* the slider "Dark area luminance threshold" allows you to choose the luminance level. below which the action of the "Luminance denoise by level" curve will be reinforced.
* the slider "Light area luminance threshold" allows you to choose the luminance level above which the action of the curve "Luminance denoise by level " will be reinforced.
* between the two values, the denoise action will depend on the curve settings.
* Reinforce denoise in dark and light areas.
Depends on the individual image and whether or not there are uniform dark and/or light areas. If the image contains an almost perfectly uniform dark area, the background of the corresponding mask will be completely black (L = 0). If the dark area is not completely uniform this value will vary. The slider will progressively increase the action of the denoise curve between the dark or light threshold and the completely uniform area. Values less than 1 decrease the action of the curve.
 
===Étapes du processus===
===Étapes du processus===
(dans l'ordre où ils apparaissent dans le menu)  
(dans l'ordre où ils apparaissent dans le menu)  

Revision as of 17:49, 9 January 2021

Comparison of the Rawtherapee noise reduction tools

Preamble

To put the Local Adjustments denoise tools into context, it is useful to summarize the other denoise tools available elsewhere in RT (Detail and Wavelets tabs) and to provide some additional information on the algorithms used. This information is complementary to the existing documentation, which can be found in the relevant sections of Rawpedia.

Tools initially designed by Emil Martinec in 2012 located in "Ftblockdn.cc".

  • Wavelets in RGB mode
  • Fourier Transform (DCT)

Other tools

  • Guided filter
  • Median filters
  • Bilateral filter
  • Gaussian blur
  • Dark frame
  • Hot/Dead pixels, etc.

We will look at the first two: Wavelets & Fourier.

The original module designed by E.Martinec between 2008 & 2012

It is composed of basic functions (Wavelets, DCT) which can also be called by other programs, such as "Wavelet Levels" and "Local Adjustments". These functions were originally designed to provide:

  • Wavelet processing with the following characteristics:
    • global action, i.e. identical for all decomposition levels and for the whole range of luminance or chroma values.
    • global noise assessment - per decomposition level - using MAD (median absolute deviation).
    • one or two passes ("conservative" and "aggressive").
  • Fourier processing for luminance noise using DCT (Discrete Cosine Transform) to process the residual noise (equal to the difference between the original image and the wavelet-denoised image).

These 2 functions were contained in a general module (Noise Reduction in the Detail tab):

  • Using luminance and chrominance with a single slider for each
  • Using automatic tiling for both wavelet and DCT operations to reduce memory requirements.

Note that in the beginning, the "Denoise" module was at the end of the process (this was also the case for the PerfectRAW product which I worked on with E.Martinec and M.LLorens).

Enhancements to original features carried out between 2012 & 2020

Several improvements were made by Ingo Weyrich and Jacques Desmis

  1. possibility of denoising by level of decomposition.# ability to denoise at pixel level by taking into account the luminance and chrominance.
  2. ability to extend the DCT Fourier processing to chrominance.
  3. addition of a DCT threshold to take into account the edge effect (origin ART ).

Improvements to the general noise reduction module (Noise Reduction - Detail tab)

  • automatic calculation of noise suppression settings.
  • 2 additional curves to process more finely the luminance and chrominance noise - 'y' axis = amplitude, 'x' axis = luminance or chrominance intensity.
  • ability to use L*a*b* mode instead of RGB mode.
  • addition of median filter denoising

A few remarks

Denoising is subject to a lot of debate, often controversial. There is also a lot of dogma and quarrels surrounding the methods and tools. My position on the following subjects is to be pragmatic. What counts is the final result.


Where should the denoise functions be located?

At the beginning, or at the end of the process? Each has its advantages and disadvantages.

  • At the beginning: denoise is carried out in linear mode, but does not take into account subsequent processing (sharpening, exposure, saturation etc.) that may increase the noise or its appearance. This results in a tendency to overcompensate for noise.
  • At the end: denoise is carried out in non-linear mode and takes into account all the processing operations including any noise artifacts that appeared early in the pipeline and were amplified by subsequent processing.
  • The ideal would be to combine the two: minimal denoise at the beginning, then additional denoising at the end.

RGB mode or Lab mode?

Each method has its advantages and disadvantages, again we need to be pragmatic.

  • The linear RGB mode should theoretically be better, mainly because of the superiority of MAD noise evaluation. However, we need to keep in mind that the way our eyes and brain react to noise can be modeled in the same way as CAMs (colored appearance models) i.e. the same noise level will be perceived differently according to whether the background is black, gray or white and varies with color and saturation.
  • The Lab mode , which requires the addition of contrast and luminance management tools (gamma, curves, sliders etc.), can be better in many cases. In addition, Lab seems to discriminate color noise better.

How many wavelet levels?

  • It is often said that only the first 4 levels are useful. This is true enough for luminance noise when the 'CAM' effect is taken into account.
  • However, if we apply noise reduction to the luminance components above level 4 we can definitely see a difference.
  • For chrominance noise, the first 4 levels are suitable for the noise which generates distributed colored pixels. For packets of noise (blotches), we can only get rid of these by going up to level 7.

Main characteristics of the various RT noise reduction tools

Noise Reduction (Detail tab)

  • no differentiation by level of decomposition.
  • pixel differentiation for luminance.
  • 5 decomposition levels for luminance, 6 for chrominance.
  • DCT used for luminance only.
  • no DCT threshold.
  • automatic tiling for wavelets.
  • automatic adjustment option.


Denoise & Refine (Wavelet Levels, Advanced tab)

  • differentiation by level of decomposition for Luminance and Chrominance (fine and coarse).
  • pixel differentiation for luminance and possibility of taking hue into account.
  • 6 decomposition levels used for luminance, 6 for chrominance.
  • differentiation using local contrast.
  • no DCT.
  • tiling option.

Blur/Grain & Denoise (Local Adjustments tab)

  • differentiation by level of decomposition for luminance and chrominance (fine and coarse).
  • pixel differentiation for luminance and possibility of taking hue into account.
  • 7 decomposition levels used for luminance, 7 for chrominance.
  • DCT for luminance and chrominance.
  • DCT threshold for luminance and chrominance.
  • recovery of all or part of the original image (prior to denoise) with the help of masks.
  • local differential selection (Rtspot).
  • use of deltaE and masks to improve selection (RTspot).
  • use of an Excluding Spot to recover noisy areas.
  • no tiling: this means that when you work in full-image mode and the image is > ~30Mb, you will need more than 8Gb of RAM to work without crashing.

Which modules should you use?

It is very difficult to answer this question, unless you want to denoise just part of the image. In this case you need to use Blur/Grain & Denoise in the Local Adjustments tab. Nevertheless :

  • with noisy or very noisy raw images from older cameras with smaller sensors, the Noise Reduction module in the Detail tab is essential and easy to use.
  • with recent low-noise raw files, the Blur/Grain & Denoise module in the Local Adjustments tab is by far the most complete even if it is a little complex.
  • The Denoise & Refine module in Wavelet Levels (Advanced tab) has the advantage of being part of the same interface as the other wavelet-processing tools thereby making it easier to tweak the settings in conjunction with the other wavelet parameters.
  • there is no point in using all 3 together. However, for noisy images the combination of Noise Reduction and one of the other modules either in Wavelet Levels or Local Adjustments is recommended.


Denoising with « Local adjustments »

Steps in the process

(in the order they appear in the menu)

Aggressive / Conservative mode (uses wavelet processing)

The "aggressive" setting is not necessarily more destructive than the "conservative” setting. It all depends on the Strength settings for both luminance and chrominance. In some cases two passes with a lower Strength setting will lead to a better result. However, the processing time will be significantly increased in this case.

Luminance denoise by level (uses wavelet processing)

the abscissa ("x" axis) represents the levels of decomposition (from 0 to 6, left to right). The y-axis represents the amount of denoise applied at each level.

Luminance detail recovery (DCT f - Fourier transform & wavelets)

this slider uses the Fourier transform to take into account the difference between the L (Lab) component of the wavelet-denoised image and the original image. It is important not to set this slider to zero because in this case, the Fourier transform will have a very strong effect on the noise and prevent the 3 equalizers from having any real influence. The more the slider is moved to the right, the weaker the DCT action will be and the more the details will be apparent.

Equalizer white-black (uses data prior to wavelet processing)

This slider corresponds to the luminance curve of the Noise Reduction module in simplified form. It allows you to focus the action on either the dark or light tones of the image. The action of the “Luminance denoise by level” curve will be modulated according to the position of the slider.

Denoise hue equalizer (uses data prior to wavelet processing)

This curve allows you to increase or reduce the action of the "luminance denoise by level " curve as a function of the  color (hue) of the image, .

Denoise based on luminance mask (uses data prior to wavelet processing)

  • the mask in "mask and modifications" (Blur & denoise ) must be activated.
  • one or both of the two curves L(L) - LC(H) must be activated.
  • the slider "Dark area luminance threshold" allows you to choose the luminance level. below which the action of the "Luminance denoise by level" curve will be reinforced.
  • the slider "Light area luminance threshold" allows you to choose the luminance level above which the action of the curve "Luminance denoise by level " will be reinforced.
  • between the two values, the denoise action will depend on the curve settings.
  • Reinforce denoise in dark and light areas.

Depends on the individual image and whether or not there are uniform dark and/or light areas. If the image contains an almost perfectly uniform dark area, the background of the corresponding mask will be completely black (L = 0). If the dark area is not completely uniform this value will vary. The slider will progressively increase the action of the denoise curve between the dark or light threshold and the completely uniform area. Values less than 1 decrease the action of the curve.

Étapes du processus

(dans l'ordre où ils apparaissent dans le menu)

sélection  « agressive / conservative ». « Wavelet »

Il n'est pas évident que « agressive soit plus destructeur que « conservative »...tout dépend de la force choisie aussi bien pour la luminance que la chrominance. Il est même probable que 2 passes de plus faible intensité aboutissent à un meilleur résultat. Par contre le temps de traitement sera nettement majoré

« luminance denoise by level »: « Wavelet »

cette courbe reprend en abscisse (axe des « x » )les niveaux de décomposition. Seuls les 3 premiers niveaux (0 1 2) sont différenciés par la courbe -  partie gauche. Pour les 4 niveaux supérieurs (3, 4, 5, 6) c'est le niveau de l'ordonnée  (axe des « y » - à droite de la courbe) qui est pris en compte. 

« Luminance detail recovery (DCT) » : « Fourier - Wavelet»

ce curseur agit via la transformée de Fourier, sur la différence entre la composante L (Lab) de l'image débruitée par « wavelet » et l'image originale. Il est important que ce curseur ne soit pas à zéro (sinon de le vouloir), car cette transformée de Fourier va avoir un effet très fort sur le bruit et empêcher les 3 « equalizer » d'avoir une réelle action. Plus le curseur sera à droite, plus faible sera l'action DCT, plus les détails seront apparents.

« Equalizer white black »: « Données avant wavelet »

Ce curseur correspond en simplifié à la courbe luminance de « Noise reduction), il permet de choisir une action plus axée sur les tons sombres ou les tons clairs de l'image. L'action de la courbe ====« luminance denoise by level »===
sera modulée en fonction de la position du curseur.

« Denoise hue equalizer » : « Données avant wavelet ».

Cette courbe permet d’accroître ou réduire par couleur (hue) de l'image, l'action de la courbe « luminance denoise by level »

« Denoise based on luminance mask » : « Données avant wavelet »

  • le masque dans « masque and modifications » (Blur & denoise ) doit être activé
  • une des 2 courbes (ou les deux) L(L) - LC(H) doit être activée
  • le curseur « dark area luminance threshold » permet de choisir le niveau de luminance en dessous duquel l'action de la courbe « luminance denoise by level » sera renforcée
  • le curseur « light area luminance threshold » permet de choisir le niveau de luminance au dessus duquel l'action de la courbe « luminance denoise by level » sera renforcée
  • entre les 2 valeurs, l'action de débruitage sera celle de la courbe.

« Reinforce denoise in dark and light areas »

Tout dépend de chaque image et de la présence ou non d'aplats dans les tons sombres et/ou les tons clairs. Si l’image contient un aplat sombre presque parfait le fond du masque correspondant sera noir absolu (L =0). Si l'aplat est imparfait cette valeur sera variable. Le curseur accroîtra l'action de la courbe progressivement entre le niveau du seuil (dark ou light) et celui (variable) de l'aplat. Les valeurs inférieures à 1 diminuent l’action de la courbe.

« Fine chroma » : « Wavelet »

- ce curseur agit sur les 4 premiers niveaux de décomposition – en général va réduire ou supprimer les points colorés de bruit.

« Coarse chroma » : « Wavelet »

- ce curseur agit sur les 3 derniers niveaux de décomposition – en général va réduire ou supprimer les paquets colorés de bruit 

« Equalizer Blue-yellow / Red Green » : « Wavelet »

change la répartition du traitement du bruit coloré.

« Chroma detail recovery (DCT) » : « Fourier - Wavelet»

ce curseur agit via la transformée de Fourier, sur la différence entre les  composantes  « a » et « b » (Lab) de l'image débruitée par « wavelet » et l'image originale. Il est important que ce curseur ne soit pas à zéro (sinon de le vouloir), car cette transformée de Fourier va avoir un effet très fort sur le bruit et empêcher les  « edge detection » d'avoir une réelle action. Plus le curseur sera à droite, plus faible sera l'action DCT, plus les détails colorés seront apparents.

« Edge detection » - « Luminance and chroma detail threshold (DCT) » « Fourier - Wavelet » 

ce curseur essaye de prendre en compte l'effet de bord de l'image originale afin de différencier l'action entre les aplats et les structures. Deux algorithmes sont disponibles (tous deux sont issus de ART..)

  • « buildblendmask » - fonction similaire à celle utilisée notamment pour différencier le demosaicing
  • « Laplacian »
  • La première sera généralement plus progressive, la seconde plus sélective notamment lorsque le curseur est très proche du maximum.

« Recovery based on luminance mask » - « Données avant et après débruitage »

Ce module agit sur la différence entre l’image originale bruitée et l'image débruitée – bien sûr en prenant en compte l'ensemble des outils ci-dessus. Ce sont les niveaux extrêmes de noir et de blanc du masque qui vont permettre de maintenir le débruitage, où de conserver l'image initiale non débruitée.

  • le masque dans « masque and modifications » (Blur & denoise ) doit être activé
  • une des 2 courbes (ou les deux) L(L) - LC(H) doit être activée
  • le curseur « dark area luminance threshold » permet de choisir le niveau de luminance en dessous duquel l'action de « denoise » sera progressivement appliquée*
  • le curseur « light area luminance threshold » permet de choisir le niveau de luminance au dessus duquel l'action de « denoise » sera progressivement appliquée
  • entre les 2 valeurs, l'image sera conservée sans débruitage, sauf si le curseur « Gray area denoise » est supérieur à 0 ; ce peut être utile par exemple pour atténuer un bruit chromatique disgracieux.
  • Le curseur « Recovery threshold » permet de choisir le niveau d'application de « denoise » en dessous de « dark » et au dessus de « light »
  • Le curseur « Decay » permet de choisir la « vitesse » d'affaiblissement ou d'amplification de l'application progressive.

Note sur les masques

  • Vous pouvez vous servir de « lockable color picker » (LCP) pour mieux cerner les zones de renforcement (ou d'affaiblissement). Attention pour que les informations du LCP corresponde aux valeurs des sliders il est nécessaire que dans « settings » - « background color for luminance and color masks » soit à zéro.
  • Vous pouvez vous servir de l’ensemble des outils masque (en association avec les LCP), pour changer les zones grises et les rendre plus ou moins claires, conduisant à inclure ou exclure des aires différentes sur lesquelles l'action aura lieu ou non : structure mask, smooth radius, gamma, slope, shadows, courbe contrast L(L), courbe local contrast wavelet.

Quelques rappels

Le module « Local adjustements » permet :

  • de réaliser des ajustements locaux du bruit et donc par nature de différencier l'action selon les objets (par couleur, par luminance...)
  • mais il permet aussi de traiter l'image entière et d'utiliser les fonctions spécifiques de « LA »
    • deltaE
    • Excluding spot
    • transitions
    • masques.


Guided Filter

Cet outil – lorsque les valeurs du curseur « détail » sont négatives – permet de générer un flou qui va masquer le bruit (luminance et chrominance) et jouer le rôle de « denoise ».

  • « Recovery based on luminance mask » fonctionne manière similaire à celui de « Denoise ».