cancel
Showing results for 
Search instead for 
Did you mean: 

Gamma curves in DPP 4

ktk
New Contributor

Hello everyone,
I noticed recently that the gamma settings in Canon DPP sometimes result in wierd color shifts.
I fully understand that the initial part of the raw processing is proprietary and there is some color magic there that produces "Canon" colors.
But I really thought that going from linear space to gamma, which comes after that, should be pretty obvious.
I googled around and I read about the different ways to apply gamma. I was really surprised that different raw converters produce different results at this stage.
For example, RawTherapee has 5 different modes for applying tone curves.
And still none of them matches what DPP does with gamma.

So the test is as follows:
1. Process a CR2 in DPP to obtain sRGB linear 16bit Tiff.
2. Disable all post-processing options as I am not sure at what point they are applied. So, no peripherial illumination, contrast, denoising, etc...
3. Save Linear Tiff.
4. Uncheck "Linear" to obtain Gamma corrected image with the default curve settings.
5. Save Gamma-corrected Tiff.
6. Try to reproduce the gamma in other software from the linear image.

Initially, I assumed that the curve in the Gamma histogram is the luminance change in log space.
And it surely acts like this for gray images (R=G=B).
However, for color something strange happens.
Example:
Linear color (30, 40, 40) (sRGB Lum: 37.874) -> Gamma color (161, 181, 183)
Linear color (30, 19, 248) (sRGB Lum: 37.872) -> Gamma color (218, 208, 255(clip))

Obviously, the second tranform is an exaggerated case where red/green shift occurs and is very visible due to the blue channel clipping.
But why are they boosted so much in the first place? It seems that the red channel value depends not only on the luminance or a fixed per channel curve, but on the other colors too.
It is somehow relative.

So my question is: Does anyone know how gamma is applied in DPP?

3 REPLIES 3

Nick2020
Product Expert
Product Expert

Hi ktk,

Thanks for checking in with us!

 

As far as I know, the math behind how DPP handles gamma curves is not a spec we've published. That sometimes means that we won't be able to provide additional information, but I went ahead and sent your inquiry to our senior engineers for consideration.

 

Our senior engineers are usually working on a couple of projects at a time, and they aren't always able to provide additional details on every inquiry. Even if they can respond, it might take a few days before I hear back.

 

If they have any relevant information to share, then I'll add a follow-up comment.

veemo
New Contributor

@ktk wrote:

Hello everyone,
I noticed recently that the gamma settings in Canon DPP sometimes result in wierd color shifts.
I fully understand that the initial part of the raw processing is proprietary and there is some color magic there that produces "Canon" colors.
But I really thought that going from linear space to gamma, which comes after that, should be pretty obvious.
I googled around and I read about the different ways to apply gamma. I was really surprised that different raw converters produce different results at this stage.
For example, RawTherapee has 5 different modes for applying tone curves.
And still none of them matches what DPP does with gamma.

So the test is as follows:
1. Process a CR2 in DPP to obtain sRGB linear 16bit Tiff.
2. Disable all post-processing options as I am not sure at what point they are applied. So, no peripherial illumination, contrast, denoising, etc...
3. Save Linear Tiff.
4. Uncheck "Linear" to obtain Gamma corrected image with the default curve settings.
5. Save Gamma-corrected Tiff.
6. Try to reproduce the gamma in other software from the linear image.

Initially, I assumed that the curve in the Gamma histogram is the luminance change in log space.
And it surely acts like this for gray images (R=G=B).
However, for color something strange happens.
Example:
Linear color (30, 40, 40) (sRGB Lum: 37.874) -> Gamma color (161, 181, 183)
Linear color (30, 19, 248) (sRGB Lum: 37.872) -> Gamma color (218, 208, 255(clip))

Obviously, the second tranform is an exaggerated case where red/green shift occurs and is very visible due to the blue channel clipping.
But why are they boosted so much in the first place? It seems that the red channel value depends not only on the luminance or a fixed per channel curve, but on the other colors too about.
It is somehow relative.

So my question is: Does anyone know how gamma is applied in DPP?


How did you solve it?

Becaouse I am seeing the same kind of thing.

ktk
New Contributor

I didn't and nobody from Canon contacted me for support.
In the end I dropped using DPP.

If you manage to make some progress on the topic,  it would be nice to post it back here.