The problem — in the post on Dynamic Range (DR), DR is defined as the range of exposure, i.e., scene (object) brightness, over which a camera responds with good contrast and good Signal-to-Noise Ratio (SNR). The basic problem is that brightness noise, which is used to calculate scene SNR, cannot be measured directly. The scene SNR must be derived from measurable quantities (the signal S, typically measured in pixels, and noise, which we call \(N_{pixels}\)).
The math — In most interchangeable image files, the signal S (typically in units of pixel level) is not linearly related to the scene (or object) luminance. S is a function of scene luminance Lscene, i.e.,
\(\displaystyle S = f_{encoding}(L_{scene})\)
Interchangeable image files are designed to be displayed by applying a gamma curve to S.
\(\displaystyle L_{display} = k\ S^{display\ gamma}\) where display gamma is often 2.2.
For the widely used sRGB color space, gamma deviates slightly from 2.2.
Although fencoding sometimes approximates \(L^{1/(display\ gamma)}\), it is typically more complex, with a “shoulder” region (a region of reduced slope) in the highlights to help improve pictorial quality by minimizing highlight “burnout”.
Now suppose there is a perturbation \(\Delta L_{scene}\) in the scene luminance, i.e., noise \(N_{scene}\). The change in signal S, ΔS, caused by this noise is
\(\displaystyle \Delta S = \Delta L_{scene} \times \frac{dS}{dL_{scene} } = \ \text{pixel noise} = N_{pixels} = N_{scene} \times \frac{dS}{dL_{scene} }\)
The standard Signal-to-Noise Ratio (SNR) for signal S, corresponding to Lscene is
\(\displaystyle SNR_{standard} = \frac{S}{\Delta S} = \frac{S}{N_{pixels}} \)
SNRstandard is often a poor representation of scene appearance because it is strongly affected by the slope of S with respect to Lscene ( \(dS/dL_{scene}\)), which is often not constant over the range of L. For example, the slope is reduced in the “shoulder” region. A low value of the slope will result in a high value of SNRstandard that doesn’t represent the scene.
To remedy this situation we define a scene-referenced noise, Nscene-ref, that gives the same SNR as the scene itself: SNRscene = Lscene / Nscene. The resulting SNR = SNRscene-ref is a much better representation of the scene appearance.
\(\displaystyle N_{scene-ref} = \frac{N_{pixels}}{dS/dL_{scene}} \times \frac{S}{L_{scene}}\)
\(\displaystyle SNR_{scene-ref} = \frac{S}{N_{scene-ref}} = \frac{L_{scene}}{N_{pixels}/(dS/dL_{scene})} = \frac{L_{scene}}{N_{scene}} = SNR_{scene} \)
SNRscene-ref = SNRscene is a key part of dynamic range (DR) calculations, where DR is limited by the range of illumination where SNRscene-ref is greater than a set of specified values ({10, 4, 1, 1} = {20, 12, 6, 0 dB}, which correspond to “high”, “medium-high’, “medium”, and “low” quality levels. (We have found these indications to be somewhat optimistic.)
\(\log_{10}(S)\) as a function of\(\text{Exposure in dB} = -20 \times \log_{10}(L_{scene}/L_{max})\)is displayed in Color/Tone and Stepchart results. (Color/Tone is generally recommended because it has more results and operates in both interactive and fixed, batch-capable modes). \(dS/dL_{scene}\) is derived from the data used to create this plot, which has to be smoothed (modestly — not aggressively) for good results. Results from the JPEG file (the camera also outputs raw) are shown because they illustrate the “shoulder” — the region of reduced slope in the highlights.
Panasonic G3, ISO 160, in-camera JPEG, run with Color/Tone Auto (Multitest). Note the “shoulder.”
The horizontal bars in the lower plot show the range of exposure for SNRscene-ref = 20, 12, and 6dB.
The human vision perspective:
|
\(\displaystyle \text{F-stop noise } = N_{f-stop} = \frac{N_{pixels}}{dS/d(\text{f-stop})} = \frac{N_{pixels}}{dS/d(\log_2 ( L_{scene})}\) \(\displaystyle\text{Using }\ \frac{d(\log_a(x))}{dx} = \frac{1}{x \ln (a)} \ ; \ \ \ \ \ d(\log_a(x)) = \frac{dx}{x \ln(a)} \) \(\displaystyle N_{f-stop} = \frac{N_{pixels}}{dS/dL_{scene} \times \ln(2) \times L_{scene}} ≅ \frac{N_{pixels}}{dS/dL_{scene} \times L_{scene}} \) where Npixels is the measured noise in pixels and \(d(\text{pixel})/d(\text{f-stop})\) is the derivative of the signal (pixel level) with respect to scene luminance (exposure) measured in f-stops = log2(luminance). ln(2) = 0.6931 has been dropped to maintain backwards compatibility with older Imatest calculations. Noting that luminance (exposure) is the signal level of the scene, \(\displaystyle \text{Scene noise} = N_{scene} = \frac{N_{pixels}}{dS/dL_{scene}} ≅ N_{f-stop} \times L_{scene} \) The key to these calculations is that the scene-referenced Signal-to-Noise Ratio, calculated from the measured signal S and noise Npixels must be the same as the scene SNR, which is based on Nscene, which cannot be measured directly. \(\displaystyle \text{Scene Signal-to-Noise Ratio} = SNR_{scene} = \frac{L_{scene}}{N_{scene}} = \frac{1}{N_{f-stop}} = \text{Scene-referenced SNR} = SNR_{scene-ref} \) the equation for Scene-referenced noise, \(N_{scene-ref}\), which enables \(SNR_{scene-ref} = SNR_{scene}\) to be calculated directly from \(S/N_{pixels}\) is given above. Displays in Stepchart, Color/Tone Interactive, and Color/Tone Auto offer a choice between f-stop noise or Scene-referenced SNR (expressed as a ratio or in dB). Note that SNRscene-ref decreases as the slope of the tonal response curve decreases (often the result of flare light in dark patches). |
The above-right image illustrates how the pixel spacing between f-stops (and hence d(pixel)/d(f-stop)) decreases with decreasing brightness. This causes f-stop noise to increase with decreasing brightness, visible in the figures above.