Is there a good example for doing white balance on ...
2 views (last 30 days)
Show older comments
Hi, Is there a good Matlab code example that can run a white balance algorithm on a variety of well color distributed images under different color temperatures?
Thanks.
0 Comments
Answers (1)
Image Analyst
on 24 Sep 2012
Well I have some. But it's about 500 lines of code so I'm not going to post it here. It also works off the x-rite color checker chart, which you can see in my File Exchange that has been snapped by a camera. It depends on how accurate you want to be. I'm sure you can find some simple but inaccurate methods that just subtract some offset from the different color channels, or, better, apply a multiplicative factor to each channel. But a more accurate way is to image a known standard, such as the x-rite color checker chart, measure each of the chip colors, and then develop a transform to map the bad RGB image into the desired RGB image (which you can assume are the sRGB values supplied by x-rite). I know Grant on the image processing team at the Mathworks has a demo for that since he showed it to me last week. He said he has it on an FTP site somewhere - ask him. There are even more accurate methods that involve correcting for the shading in the camera and the OECF of the camera but I don't want to get into those.
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!