Looking at the DNG SDK (v1.4), I found that the exposure operation is implemented as a 1D function, with a small non-linearity in the very low part of the dynamic range for positive exposure values, and a significant non-linearity in the high part of the dynamic range. This can be seen in the DNG SDK at dng_function_exposure_ramp::Evaluate and dng_function_exposure_tone::Evaluate.

In fact, for positive exposure values, while the operation is linear (with a small offset) for values higher than some small threshold (fBlack + fRadius). However, for lower values, the operation is quadratic. For negative exposure values, the lower part of the dynamic range (up to 0.25) is handled linearly, the highlights are handled with a quadratic function.

My question, is what's the reason for that non-linearity, and how important is it for the final result.

(I'm asking about the reasoning behind the decision to perform a non-linear operation for exposure.)


2 Answers 2


This accounts for nonlinearity in human perception of brightness. This page, citing Williamson & Cummins (1983), explains:

enter image description here

In considering this question we can replace "reflectance" with "exposure." Note that the response curve has a roughly constant slope for all but the darkest range.

  • We know that perception is on a log scale, hense the use od EV and Stops on that scale, and doubling the time on each stripmof a test print. Are you indicating that the curve changes at the darkest end? And that the transformed values are supposed to back-out that effect so the resukt is log everywhere? That would mess up shadow boosting or any operation that changes the brightness of those pixels.
    – JDługosz
    Jan 20, 2015 at 3:18
  • I'm not going that far with the answer, though a log-throughout model may be more correct than what the DNG SDK does. Here I'm merely noting that Williamson & Cummins' empirical curve on a bounded stimulus is practically linear for the 80% brightest stimulii and exponential for the darkest range of stimulii, and thus consistent with what the questioner observed. (They note that the curve is approximately logarithmic for those that take solace in parsimony.)
    – feetwet
    Jan 20, 2015 at 3:36
  • 1
    The perception non-linearity is already addressed in the gamma function applied just before displaying the image, not in the middle of the processing pipeline. Also, this does not explain the case of negative exposure, where the nonlinearity (in DNG SDK) is on the higher part of the dynamic range.
    – Ben-Uri
    Jan 20, 2015 at 7:36
  • Scene is linear; sensor is nearly linear. Human perception has no play here.
    – Iliah Borg
    Jan 20, 2015 at 18:37
  • 3
    @Ben-Uri: Image gamma counteracts monitor gamma. The result needs to be nearly linear.
    – Iliah Borg
    Jan 20, 2015 at 18:39

I found that the recording of the darkest areas was itself nonlinear. The blacks taper off giving a much larger range, with bigger steps between each value. My experiment was done many years ago, but that might (still) be an inherent property of the sensor technology. (That would mean that a well has a harder time registering a hit when it is empty)

  • 1
    But such issues should be addressed in the linearization step (Chapter 5 in the DNG Spec.), and anyway are not a function of the user custom exposure selection.
    – Ben-Uri
    Jan 19, 2015 at 20:19
  • 1
    > I found that the recording of the darkest areas was itself nonlinear. The answer is: flare in the box and also because of the lens forms a toe in the data. Flare causes loss of contrast, especially visible in shadows.
    – Iliah Borg
    Jan 20, 2015 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.