Another of those hot topics in digital photography forums are the discussions surrounding the dynamic range of photographic equipment. Very likely, such discussions would be much less frequent if a few years ago people had not started talking about HDR photography or High Dynamic Range, as a strategy to capture scenes that lie outside the dynamic range of our equipment, which soon ended up becoming all kinds of manipulation of scenes of questionable taste.
A priori, the dynamic range of photographic equipment is usually defined as the ratio between the maximum and minimum light intensities capable of being recorded by a sensor. The maximum threshold is the sensor’s saturation limit, while the minimum intensity is determined by the signal-to-noise ratio (SNR) from which the details in the shadows fade due to noise (more signal means less noise, more noise means less signal).
However, when we talk about the dynamic range of a scene, we are referring to the maximum and minimum luminance values capable of being captured by the sensor, as well as the relationship between these values. We speak of luminance as a measure to quantify the amount of light reflected on an object and reaching the observer as a stimulus.
The amount of light reflected by a surface depends on its opacity. We speak of the opacity of a surface insofar as it is impermeable to light, that is, it absorbs or lets pass all the light when traversed (transmittance) or is reflected (reflectance).
This quality of surfaces can be expressed in terms of their optical density, so that optical density is expressed by the logarithm of the opacity. It is easy to understand at this point that a less dense surface (0) will let pass or reflect all the light that reaches it, and a very dense surface (100) will absorb all the light that reaches it.
In this way, density is expressed by the equation:
D = log(1/T)
Where T is the % of light transmitted or reflected. From this same equation, we can deduce the amount of light reflected or transmitted by a surface, so that:
% light reflected or transmitted = (1 / 10D)*100
Thus, in the same scene there will be surfaces that reflect more light Minimum Density (Dmin), and surfaces that reflect less light Maximum Density (Dmax), or the same for surfaces that transmit more light (Dmin) or less light (Dmax). The relationship between Dmax and Dmin constitutes the dynamic range of a scene, also called density range:
RD = Dmax - Dmin
Although this concept is useful for understanding the nature of a scene, we can see it more relevantly during the digitization processes of photographs whether paper copies, negatives or slides and works of art in general, where we can find areas with more or less density (areas that reflect more or less light), so it is possible that our capture equipment, whether a scanner or a digital camera like a D-SLR, is not up to the task in terms of the available dynamic range to cover a particular density range.
Therefore, before undertaking a digitization process, we must evaluate both the document to be digitized and the capture device, in order to know if the dynamic range of the document (or scene) fits within that of the device.
To evaluate the DR of a device, we will need a densitometric scale like Kodak Q13 or Stouffer, and some tool (Imatest, Frame, etc.) for the precise estimation of the dynamic range. It is possible to make assessments from a histogram representation of the image of our scale, for example using RawDigger; however, it is difficult to determine a precise DR value since it is complex to accurately determine the signal-to-noise ratio. The difficulty with these scales is that they have a Dmax of 1.9 for the Q13 and 2.05 for the Stouffer; if we work with transmissive material, the Stouffer can reach a Dmax of 4, and these densities may not be optimal for evaluating certain materials or devices.
Similarly, capture devices present a theoretical dynamic range (TDR) derived from the number of levels (Pixel Level) they are capable of representing, so a 12-bit depth sensor can represent:
TDRlinear = 2n-1 212 = 4095
So for a 12-bit sensor we could represent 4095 levels (0-4095), or equivalently a contrast ratio or linear DR of 1:4095, which would be about 12EV; however, this DR estimation is purely theoretical, or at least optimistic, since noise phenomena in the shadows are not considered.
Similarly, we can represent the TDR in terms of density:
TDR = Log(2n-1) TDR = Log(212-1) = 3.6
Therefore, the theoretical density that a 12-bit sensor can record is 3.6.
Since the DR depends considerably on noise, which is more present in areas where the signal is lower (shadows), RAW development processes will significantly condition our results; for example, a tonal adjustment can cause an increase in noise in the shadows and affect the final DR. Likewise, the sensitivity at which we are working will be an obvious conditioning factor of the DR.
Frequently, most modern tools for calculating DR will give us the data in EV. Thus, for the example I will illustrate, my Nikon D200 would have 6.69EV of Dynamic Range according to the FRAME analysis tool.
The next step is to determine the Dynamic Range of our document to be digitized, in this case a black and white photograph. For this, we will calculate the density of the highlight and shadow areas in order to determine Dmax and Dmin and thus the ratio between them.
To calculate the density of a surface, we would need a spectrodensitometer, which is quite an expensive device. As an alternative, we can use a spectrophotometer, since density is essentially the weighting of spectral reflectance. For this, it is enough to have the spectral values of a sample and enter them into my online calculator “SPD to CIELAB, Density & sRGB” to obtain the density value of our sample.
Alternatively, we can photograph our document alongside our densitometric scale and in our PS compare the luminosity values (CIELAB) in areas of it against our scale, in order to determine the density by locating the patch with the closest values.
The results for my black and white photograph are: Dmax=1.83 and Dmin=0.23, the DR = 1.6
However, now we find ourselves needing to relate a DR expressed in terms of density with one expressed in EV. For this, we can use the formula:
RDev = log(RDlinear) / log (2)
Where RDev is the Dynamic Range expressed in EV or logarithmic terms and RDlinear is the one expressed linearly, also known as contrast ratio.
Thus, we have:
log(RDlinear) = Log(2) * 6.69
RDlinear = 103
Which indicates a contrast ratio of 1:103
With this data, we can already know the optical density using the equation:
D = log(Io/I) D = log(103/1)
Which indicates that our capture device has the possibility to record a Dmax of 2.01, so it will have a DR = 2.01, since theoretically our device can record densities from 0 to 2.01.
Relating this to the data from our image, we can easily deduce that we will not have problems during digitization since our equipment has a greater DR than that represented by the photograph or documents to be digitized.
The calculations are actually a bit simpler since there is a direct relationship between density and EV:
1D = 3.322EV
Therefore:
6.69EV / 3.322 = 2.01D
And if we wanted to find the contrast ratio from the density, we would only need:
102.01 = 102.3 ≈ 103
It could also happen that our Dynamic Range is expressed in dB (decibels), according to the following relation:
DRdb = 20 * log(RDlinear) DRdb = 20 * log(103)
For my Nikon D200: 40db.
With dB we can again calculate the optical density, and with the density again the contrast ratio, or linear dynamic range.
40db / 20 = 2.01D 102.01 = 102.3 ≈ 103
Finally, in the following table we can appreciate the relationships between contrast (linear DR), aperture measured in EV, and optical density
| EV (f-stops) | Contrast ratio (linear) | Optical Density |
| 1 | 1:2 | 0,3 |
| 2 | 1:4 | 0,6 |
| 3 | 1:8 | 0,9 |
| 4 | 1:16 | 1,2 |
| 5 | 1:32 | 1,5 |
| 6 | 1:64 | 1,8 |
| 7 | 1:128 | 2,1 |
| 8 | 1:256 | 2,4 |
| 9 | 1:512 | 2,7 |
| 10 | 1:1024 | 3,0 |
| 11 | 1:2048 | 3,3 |
| 12 | 1:4096 | 3,6 |
| 13 | 1:8192 | 3,9 |
| 14 | 1:16384 | 4,2 |
| 15 | 1:32768 | 4,5 |
| 16 | 1:65536 | 4,8 |
Another relationship that may be interesting to know is how pixel levels relate to density (Pixel Level), the equation is as follows:
PL = 255*(10-d/1.01)1/g
Where d is the density and g is the gamma, usually 2.2.
Through this equation we can deduce, for example, the RGB levels of a densitometric scale. Thus, if for example the N2 patch of our Colorchecker has a value of 0.23D then it should have:
255*(10-0.23/1.01)1/2.2=199.5
Therefore, the second neutral patch of our Colorchecker under correct exposure should have RGB values close to 200. This would be correct for the sRGB space, but if we use another working space, the values would change.
