Difference between revisions of "Dynamic Range Compression"

m (List and italics)
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
== Introduction ==
 
== Introduction ==
  
Dynamic range in broad terms is the ratio of the largest to the smallest value of a measured signal. There are various things you as a photographer have to deal with which have a dynamic range of their own - human [https://en.wikipedia.org/wiki/Dynamic_range#Human_perception visual perception] has a dynamic range (you can see very faint stars at night and you can see a bright sky during daytime, though not both at once), your monitor has a dynamic range (far lower than human vision), as does your camera's sensor and the electronics which process the signal captured by the sensor. The Dynamic Range Compression tool is used to compress and redistribute the dynamic range of the scene captured in a photograph.
+
Dynamic range is the ratio of the largest to the smallest value of a measured signal. In photography it commonly refers to the ratio of the brightest element of a scene to the darkest. An outdoor scene on a very foggy day commonly has very little difference between the brightest and darkest elements, which is known as a ''low dynamic range'' scene. In contrast, an indoor scene with a visible sunny sky through a window is known as a ''high dynamic range'' scene.
  
The dynamic range of the scene is the ratio of the brightest element in the scene to the darkest. If you imagine an outdoor scene on a very foggy day, the brightest element would not appear much brighter from the darkest element, so the scene is said to have a low dynamic range. On the other hand, if you were to stand indoors on a sunny day, the sun-lit clouds outside would appear far brighter than the lamp-lit room, let alone the dark corners of the room - this is a high dynamic range scene.
+
The dynamic range of a scene can easily exceed the dynamic range of the "sensor" that captures the scene. The [https://en.wikipedia.org/wiki/Dynamic_range#Human_perception human visual system] has an adaptive and wide dynamic range (you can see faint stars at night but also bright skies during day). This is very different from the fixed, lower dynamic range of your camera sensor and the (usually even lower) dynamic range of your monitor. As such, photography and image processing needs to deal with mapping high dynamic ranges to lower ones.
  
The dynamic range of the scene being captured usually exceeds the dynamic range of the viewing device (monitor, laptop, smartphone). To show the scene on the viewing device, generally two things can happen: either a certain segment of the dynamic range which falls outside of that which the monitor can reproduce is discarded (the sky outside is clipped white so the you can see the inside of the room, or the sky outside is reproduced at the cost of the room being clipped black), or the dynamic range of the scene can be compressed so that both the dark and the light areas are visible, and that is where this tool comes into play.
+
In general there are two ways to handle dynamic range changes: either discard a portion of the data outside the destination range (e.g. clipping highlights), or compress the data so that it fits the destination range. The Dynamic Range Compression tool uses the latter approach based on the [http://www.cs.huji.ac.il/~danix/hdr/ Gradient Domain High Dynamic Range Compression] algorithm developed by R. Fattal and coworkers. This algorithm is often simply referred to as "Fattal", e.g. in Luminance HDR.
  
The Dynamic Range Compression tool is used to compress the dynamic range of an image, reducing highlights and lifting shadows. It is based on the paper [http://www.cs.huji.ac.il/~danix/hdr/ Gradient Domain High Dynamic Range Compression], referred to in other software such as Luminance HDR simply as "Fattal".
+
The algorithm uses two parameters to control the compression (α and β) which can be tuned by the "detail" and "amount" sliders of the tool, respectively. The tool operates in RGB space and is applied right after [[Noise_Reduction|Noise Reduction]] and [[Haze_Removal|Haze Removal]], but before other tone curve adjustments such as the [[Exposure]] controls.
  
The tool operates in RGB space and is applied right after [[Noise_Reduction|Noise Reduction]] and [[Haze_Removal|Haze Removal]], but before other tone curve adjustments such as the [[Exposure]] controls.
+
N.B. There are alternative ways of compressing the dynamic range using other tools. The simplest would be a negative contrast value in the [[Exposure]] tool to reduce (or rather to redistribute) the dynamic range, however the effect would most likely appear flat and unappealing. A curve gives more control over the process, but may need a lot of fine-tuning.
 
 
The "detail" slider corresponds to the α (alpha) parameter in the paper, and the "amount" slider corresponds to β (beta).
 
 
 
There are alternative ways of compressing the dynamic range using other tools. The most simple would be a negative contrast value in the [[Exposure]] tool to reduce (or rather to redistribute) the dynamic range, however the effect would most likely appear flat and unappealing. A curve gives one more control over the process, however this tool is designed specifically for the task.
 
  
 
== Usage ==
 
== Usage ==
Line 21: Line 17:
 
Use this tool when the dynamic range of the photographed scene is too high to be reproduced on your monitor in an aesthetically pleasing way, that is when you find that the difference between the dark tones and the bright tones (the contrast) is so strong that there is a lack of detail in those areas.
 
Use this tool when the dynamic range of the photographed scene is too high to be reproduced on your monitor in an aesthetically pleasing way, that is when you find that the difference between the dark tones and the bright tones (the contrast) is so strong that there is a lack of detail in those areas.
  
Heads-up panorama stitchers! The effects of this tool depend on the dynamic range (and histogram) of the image being edited. If you are processing a series of images intended for stitching, where each image contains a section of a scene adjacent to the one before it, even if you were to apply identical parameters to these images using this tool, the end results would not be consistent - there would be sudden changes in brightness between adjacent images. Do not use this Dynamic Range Compression tool on the source images. If you need to compress the dynamic range across a series of images in a consistent way, use a curve instead. You can, however, use this tool on the stitched panorama.
+
'''Note for panorama's''' The effects of this tool depend on the dynamic range (and histogram) of the image being edited. If you are processing a series of images intended for stitching, where each image contains a section of a scene adjacent to the one before it, even if you were to apply identical parameters to these images using this tool, the end results would not be consistent - there would be sudden changes in brightness between adjacent images. Do not use this Dynamic Range Compression tool on the source images. If you need to compress the dynamic range across a series of images in a consistent way, use a curve instead. You can, however, use this tool on the stitched panorama.
  
 
== Interface ==
 
== Interface ==
  
=== Amount ===
+
The tool provides three sliders.
 
+
* ''Amount'' sets the strength of the compression. Higher values lead to a narrower dynamic range (you can easily see the effect by observing the histogram).
Sets the amount of compression, where higher values lead to more dynamic range compression.
+
* ''Detail'' sets how much local contrast is preserved. Positive values reduce the compression in favor of more contrast, negative values reduce the contrast.
 
+
* ''Anchor'' biases the compression towards the shadows or highlights, effectively functioning as an exposure compensation.
=== Detail ===
 
 
 
The amount of detail that is preserved can be tuned with this parameter. Negative values smooth the image by reducing local contrast, while positive values increase it.
 
  
=== Anchor ===
+
The example below shows the typical effects of each slider (click to enlarge).
  
This parameter biases the compression towards the shadows or the highlights. It functions in effect as an exposure compensation.
+
[[File:DRC-Example.jpg]]

Latest revision as of 08:48, 17 June 2021

Dynamic Range Compression

1 Introduction

Dynamic range is the ratio of the largest to the smallest value of a measured signal. In photography it commonly refers to the ratio of the brightest element of a scene to the darkest. An outdoor scene on a very foggy day commonly has very little difference between the brightest and darkest elements, which is known as a low dynamic range scene. In contrast, an indoor scene with a visible sunny sky through a window is known as a high dynamic range scene.

The dynamic range of a scene can easily exceed the dynamic range of the "sensor" that captures the scene. The human visual system has an adaptive and wide dynamic range (you can see faint stars at night but also bright skies during day). This is very different from the fixed, lower dynamic range of your camera sensor and the (usually even lower) dynamic range of your monitor. As such, photography and image processing needs to deal with mapping high dynamic ranges to lower ones.

In general there are two ways to handle dynamic range changes: either discard a portion of the data outside the destination range (e.g. clipping highlights), or compress the data so that it fits the destination range. The Dynamic Range Compression tool uses the latter approach based on the Gradient Domain High Dynamic Range Compression algorithm developed by R. Fattal and coworkers. This algorithm is often simply referred to as "Fattal", e.g. in Luminance HDR.

The algorithm uses two parameters to control the compression (α and β) which can be tuned by the "detail" and "amount" sliders of the tool, respectively. The tool operates in RGB space and is applied right after Noise Reduction and Haze Removal, but before other tone curve adjustments such as the Exposure controls.

N.B. There are alternative ways of compressing the dynamic range using other tools. The simplest would be a negative contrast value in the Exposure tool to reduce (or rather to redistribute) the dynamic range, however the effect would most likely appear flat and unappealing. A curve gives more control over the process, but may need a lot of fine-tuning.

2 Usage

Use this tool when the dynamic range of the photographed scene is too high to be reproduced on your monitor in an aesthetically pleasing way, that is when you find that the difference between the dark tones and the bright tones (the contrast) is so strong that there is a lack of detail in those areas.

Note for panorama's The effects of this tool depend on the dynamic range (and histogram) of the image being edited. If you are processing a series of images intended for stitching, where each image contains a section of a scene adjacent to the one before it, even if you were to apply identical parameters to these images using this tool, the end results would not be consistent - there would be sudden changes in brightness between adjacent images. Do not use this Dynamic Range Compression tool on the source images. If you need to compress the dynamic range across a series of images in a consistent way, use a curve instead. You can, however, use this tool on the stitched panorama.

3 Interface

The tool provides three sliders.

  • Amount sets the strength of the compression. Higher values lead to a narrower dynamic range (you can easily see the effect by observing the histogram).
  • Detail sets how much local contrast is preserved. Positive values reduce the compression in favor of more contrast, negative values reduce the contrast.
  • Anchor biases the compression towards the shadows or highlights, effectively functioning as an exposure compensation.

The example below shows the typical effects of each slider (click to enlarge).

DRC-Example.jpg