• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

sRGB luminance precision

Doug Kerr

Well-known member
We recognize that the sRGB encoding that underlies our JPEG image files encodes the color of each picture to "less precision" than we think of as being present in the raw data from digitization of the sensor photodetector outputs.

Of course, we can't make an exact comparison of "how much less precision" since, for one thing, the three color coordinates from the sensor (generally, but misleadingly, labeled R, G, and B) do not correspond to the linear versions of the three coordinates of the RGB color space. That is, the sensor does not actually operate in any kind of RGB color space.

But that doesn't really matter in getting a general idea of the relative precision of the RGB representation and that of the "sensor color space".

What we often don't realize is that this ratio of precision varies dramatically over the whole tonal scale, because of:

• The nonlinear nature of the actual values R, G, and B ("gamma precompensation").

• The use of tonal transform curves in the internal camera processing from the sensor raw data to the RGB data.

But, again to allow is to get some idea of the relationship, lets take these situations:

• 12- and 14-bit encoding of the sensor data

• The use of the whole range of the 12- or 14-bit variable to span the range from "black" to "saturation" (not quite true in most real cases).

• No use of nonlinear tone-mapping in in-camera processing of the raw data into RGB data (not likely true in most real cases).

We will then look at how many steps of the "data number" (DN) (the 12- or 14-bit encoded value of the sensor photodetector output) correspond to one step of the R, G, and B values (we will assume only gray colors for simplicity, where R=G=B)). We will do this for several places along the tonal scale (described in terms of stops down of the luminance of interest from the saturation luminance).

The results are shown in this table:

Please excuse my use of the Code tag; it is the only way to make a reliable table.​
Code:
Luminance       DN steps per RGB step
(stops below  (rounded to integer values)
saturation)       12-bit     14-bit

  0.0               36        146
  0.5               30        119
  1.0               24         98
  2.0               16         64
  4.0                7         29
  6.0                4         13
  8.0                1          6

Note that as we go more toward the black end of the scale, the encoding precision gets better (fewer DN steps per RGB value step).

This relationship is in part intended to recognize that, in human vision, we perceive smaller differences in luminance for smaller values of the base luminance (something like the logarithmic response that is typical of so much human perception).

Note that this is not necessarily true if we are considering small changes in luminance in a "dark" region of an image which also has lighter regions.​

Best regards,

Doug
 
Top