Sharpening: Difference between revisions

From RawPedia
Jump to navigation Jump to search
(Fixed typo, thanks Lebarhon)
 
(Updated RL Deconvolution section)
Line 39: Line 39:


== RL Deconvolution ==
== RL Deconvolution ==
[https://en.wikipedia.org/wiki/Richardson%E2%80%93Lucy_deconvolution RL deconvolution] is named after the makers of this algorithm, Richardson and Lucy. Here it is assumed that the image suffers from a Gaussian blur (like when applying a Gaussian filter) which might be produced by the lens, motion, etc. In reality the blur might come close to a Gaussian blur, but not exactly. Therefore some artifacts like halos might occur when you try to remove the Gaussian blur.
[https://en.wikipedia.org/wiki/Richardson%E2%80%93Lucy_deconvolution RL deconvolution] is named after the makers of this algorithm, Richardson and Lucy. It uses the [https://en.wikipedia.org/wiki/Point_spread_function point spread function] (PSF) to deconvolve (reverse) the effects of Gaussian-like blur. In reality, the blur produced by the lens and by motion may differ from Gaussian blur significantly, therefore some artifacts, such as halos, may appear when the radius diverges too far from the type of blur in the actual image, and when then effect is too strong.


=== Radius and Amount ===
=== Radius ===
You can define the ''Radius'' of the gaussian blur you want to remove. When you set the Amount to 100 the gaussian blur will be removed completely, but as this gives a harsh result a lower setting is recommended.
The radius defines the [https://en.wikipedia.org/wiki/Standard_deviation standard deviation] (sigma) of the [https://en.wikipedia.org/wiki/Gaussian_blur Gaussian blur] in the image. Find the right value through trial and error.


=== Damping and Iterations ===
=== Amount ===
The Damping is used to avoid sharpening of noise on smooth areas. As deconvolution cannot be done perfectly at the first time several Iterations are necessary. How much is changed between each iteration is defined by the Richardson-Lucy algorithm. The more iterations are used the more perfectly the gaussian blur is removed, but with each iteration the speed decreases and the danger of halo artifacts rises. Normally you don't want to remove the gaussian blur perfectly due to personal visual taste and speed. The default settings should be fine most of the time.
Controls the blend factor between the unsharpened image and the sharpened one.
 
=== Damping ===
Damping reduces the effect of the deconvolution at each iteration. It has the effect of preventing sharpening of the finest details. Use it if the sharpened image has too much "bite" at the finest level.
 
=== Iterations ===
RL Deconvolution is an iterative algorithm; it requires being repeated in order to achieve the intended results. Each repetition of the process is called an "iteration", and the result of one iteration is used as the starting point of the next iteration. While each iteration removes blur, it also increases processing time and the likelihood that halo artifacts will appear, so you need to find the perfect balance through trial and error - the default value should be fine for most cases.

Revision as of 09:54, 13 March 2018

The effects of this tool are only visible at a preview scale of 1:1 or more. Use a detail window (click on the Window-add.png icon under the main preview panel) to inspect a part of the image, or zoom the main preview to 100% (also called 1:1) Magnifier-1to1.png.


Note: The Sharpening tool is computed before the Resize tool, so if you set a resize value and were planning to adjust a post-resize sharpness, it will not be possible at the moment. But if you resize your image by a factor of 0.5 for example, you might want to double your sharpening radius value. Unfortunately, sharpening cannot be previewed at scales lower than 1:1.

Unsharp Mask

Unsharp masking (USM) is a technique used to increase the apparent acutance (edge contrast) of an image, making it appear clearer, even though it technically does not really sharpen the image. It makes use of several phenomena of the human visual system in order to accomplish this effect, such as the Cornsweet illusion and Mach bands. Though unsharp masking in other software is eas ily prone to causing halos, RawTherapee has a unique threshold slider which allows you to achieve a superb sharpening effect without a minimal risk of halos.

Radius

The Radius determines the size of the details being amplified and, consequently, relates to the width of the sharpening halo. In general the quality of sharpening is best if the sharpening radius is smaller. For low ISO images that are in focus and without motion blur a value of 0.5-0.7 is satisfactory.

Amount

The Amount parameter controls the strength of the sharpening.

Threshold

Usm threshold.png The Threshold tool helps to suppress noise amplification and haloing and to confine sharpening to a desired tonal range. The Threshold tool allows one to create a curve via which the sharpening is applied. The vertical axis corresponds to opacity: 0% at the bottom (transparent, sharpening not visible), 100% at the top (opaque, sharpening visible). The horizontal axis corresponds to luminosity: select the tonal range that will get sharpened - the darkest tones are on the left, progressing to white tones on the right. As mentioned in the tooltip, to move each of the points in the threshold tool individually, hold the Shift key before clicking on a point with your mouse. Holding the Ctrl key while moving a point with the mouse allows for very fine movements.

When moving the right pair of sliders to the left side, sharpening is reduced in the highlights. When moving the left pair of sliders to the right side, sharpening is reduced in the shadows and minimizes amplification of dark noise.

The default threshold values will protect from over-sharpening and haloing in most cases and limit the sharpening effect to mid-tones. In the example screenshot, the blackest tones have no USM applied, then USM is applied to a broad range of tones from dark to light, and the strength of USM gradually drops off from maximal at the mid-tones to none at the whitest tones, so as to prevent noise amplification and haloing.

Sharpen Only Edges

If you activate "Sharpen only edges" then uniform areas will not be sharpened. This is useful when sharpening noisy photos.

Two new sliders appear as well:

Radius

The Radius is used for noise detection. If the noise is low, a lower radius can be used, and vice-versa. A higher radius slows down the image processing.

Edge Tolerance

Edge Tolerance determines how much a pixel has to differ from its neighbor to be considered as an edge and not as noise. It is very similar to the USM Threshold parameter and has a high impact on the visual quality. For low ISO (low noise) images use 1000 or less, for high ISO images use 2500-3000 or even more.

Halo Control

Halo Control is used to avoid halo effects around light objects when sharpening too aggressively. When activated, a new slider appears:

Amount

At 100 it works at maximum, reducing the visual impact of the USM filter.

RL Deconvolution

RL deconvolution is named after the makers of this algorithm, Richardson and Lucy. It uses the point spread function (PSF) to deconvolve (reverse) the effects of Gaussian-like blur. In reality, the blur produced by the lens and by motion may differ from Gaussian blur significantly, therefore some artifacts, such as halos, may appear when the radius diverges too far from the type of blur in the actual image, and when then effect is too strong.

Radius

The radius defines the standard deviation (sigma) of the Gaussian blur in the image. Find the right value through trial and error.

Amount

Controls the blend factor between the unsharpened image and the sharpened one.

Damping

Damping reduces the effect of the deconvolution at each iteration. It has the effect of preventing sharpening of the finest details. Use it if the sharpened image has too much "bite" at the finest level.

Iterations

RL Deconvolution is an iterative algorithm; it requires being repeated in order to achieve the intended results. Each repetition of the process is called an "iteration", and the result of one iteration is used as the starting point of the next iteration. While each iteration removes blur, it also increases processing time and the likelihood that halo artifacts will appear, so you need to find the perfect balance through trial and error - the default value should be fine for most cases.