In doing research on in-camera histograms, I have found repeated assertions that the luminance histogram is the same as the green channel histogram, color science to the contrary (the only RGB color space in which colorimetric luminance is the same as the green channel would have to have three identical primaries, all of them the white point, with the designation of one of them as “green” being therefore arbitrary). I thought that it was possible that camera manufacturers were taking computational shortcuts, so I constructed a test target with not much green. It’s R=255, G=0, B=255 in Adobe 1998 RGB; give it a try yourself, but read the next post before you do.
Here’s the result for the D4 (in-camera white balance, contrast, brightness, and saturation adjusted to approximate the real raw histogram):
And here’s what you get with the D800E (in-camera white balance, contrast, brightness, and saturation adjusted to approximate the real raw histogram):
Other cameras that I have produce similar results. Of the four or five cameras that I have tested, I have found none for which luminance is simply the green channel.
Notice that the spread of the histogram is different in the two pictures. Hold that thought…
Iliah Borg says
Luminance is computed as a sum of approximately 30% red, 59% green and 11% blue. By standard, it should be computed in Gamma=1.0 space, but this is not followed.
Jim says
Iliah,
You are correct on both parts of how to compute luminance, if you interpret “by standard” to be equivalent in this context to “colorimetrically”. The exact coefficients depend on the color space. In spaces with non-physical primaries, such as Pro-Photo RGB, we can get led down a linear-algebra-rathole if we push it too far. The luminance of R=0, G=0, B=255 in ProPhoto RGB is like the sound of one hand clapping, since we can’t construct (or see) the blue primary. Saying that luminance is only applicable within the spectral horseshoe that bounds the visible colors makes my head hurt less. Fortunately, cameras don’t use ProPhoto RGB in their JPEGs, so this is only a concern after the raw images are converted in the computer.
I am interested in your statement “…this is not followed.” Do you mean that no camera manufacturers compute luminance colorimetrically, in a linear fashion? It’s not like it would take much processing power to do so, especially when compared to the DCT processing for compression of a JPEG image.