GammaCorrection/ White balance
10 views (last 30 days)
i have an RGB image, which needs a white balance. As i make it linear, overexposure happens (especially in the sky area)! anybody knows how can i make a logarithmic correction considering the gamma?! tnx in advance,
Image Analyst on 16 Apr 2012
Use the "Curves" tool in Photoshop. Or, I really like the highlights and shadows tool.
Or, you can do trial and error by multiplying your image by the gamma function ( http://en.wikipedia.org/wiki/Gamma_correction). Be sure to adjust the amplitude to take into account that the different channels have different values for the white region. For example what you want to be white is (230, 200, 170) and so the gamma function will need to be different if you want to end up with white at (245,245,245) or whatever. I wouldn't go all the way to 255 because otherwise there may be some pixels that get saturated.
Or you can do it the best, but most difficult, way and that is to take a picture of a Color Checker chart ( http://en.wikipedia.org/wiki/ColorChecker) and derive the transform to map your input color image into the desired color image. The math is too involved to post here, but I've done it in MATLAB.
Mahmoud Afifi on 12 Aug 2019
Try this one:
Reference: When Color Constancy Goes Wrong: Correcting Improperly White-Balanced Images, CVPR'19.