Alley in Pisa, Italy

by Lars Kotthoff

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I have a bespoke Image Capture & processing flow, wherein I do the following operations:-

Capture Raw data-->De-Bayer(Get RGB)-->Color Balance-->RGB-to-YCbCr-->Image sharpening-->Denoise filtering-->YCbCr-to-RGB-->Gamma correction(Gamma encoding)-->Store the file as BMP.

But now as some new requirement, I need to store the final output file in YUV/YCbCr format. So the new flow would be:

Capture Raw data-->De-Bayer(Get RGB)-->Color processing-->RGB-to-YCbCr-->Image sharpening-->Denoise filtering

My questions is now where should I apply the Gamma correction, since there is no conversion back to RGB space after the image sharpening and denoise filtering in YCbCr space?

Will it yield same/similar image quality when viewed, if I apply gamma correction in RGB space after Color balance, before it is converted to YCbCr space and thus before Image sharpening and denoising?

Any pointers appreciated.

thank you.

-AD

share|improve this question

2 Answers 2

Gamma should be applied on luminance (Y in your case) as it pertains to contrast.

There should be no reason to do it in RGB. I suspect many programs do it independently on each channel rather than on luminance to avoid converting back and forth. Results should actually be at least a little better doing it on luminance.

share|improve this answer
    
But then Gamma also means how colors look on the screen. So why not apply on chrominance channels(Cb,Cr)? –  goldenmean Feb 18 '11 at 14:42
    
@goldenman - Not really. Think about the standard gamma test where you have a solid block of color near alternating stripes of color and black. The relation between the solid color and the way our eye sees the average of the stripes is about the luminance curve of the display (or medium in case of prints). –  Itai Feb 18 '11 at 15:57
    
And I guess Gamma should be related to brightness (perceived intensity), rather than contrast.Correct me if wrong. But got your point about Gamma related more to Luminance component than chrominance component. –  goldenmean Feb 18 '11 at 16:12
    
@goldenmean - Yes! Note that brightness and contrast are correlated on most displays. It is hard to change contrast or brightness without affecting the other. That is why the contrast ratio of a display is computed at a specific brightness. –  Itai Feb 18 '11 at 16:23

The BT.709 standard as does the sRGB standard define that gamma correction should be applied to each RGB channel independently, not only on the Luma channel as the first answer implies.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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