Re: Color balance in YUV/YCbCr domain

From: IlGab (gab_at_ldm.cjb.net)
Date: 06/04/04


Date: 4 Jun 2004 05:39:01 -0700

jason@cintec.cuhk.edu.hk (Jason) wrote in message news:<d99bb315.0406020325.57a33e96@posting.google.com>...
> Dear All,
>
> In RGB domain, I can do "Auto Level" to get a color balanced photo by
> working on R, G and B histogram independently. i.e. to widen the
> dynamic range of each color channel to 0-255.

 Hi guy, it's correct, you can "Auto Level" separately on R, G and B.
This operation modify the istograms stretching them separately, this
can generate false colors because the tree channels are modified
separately. A good result can be achieved autoleveling only the
luminance channel. You can convert the image from RGB to YPbPr (YCbCr)
or CIE-Lab (CIE-Luv) and then compute a contrast stretch on Y or L,
then return into RGB and look the result! You can compute a gamma
correction to get a better result. If you have the time for
implementing a filter you can implement a lighting compensation one
like homomorphic or retinex.
 
> However, in YUV/YCbCr domain, how can I do color balancing? Any work
> around or simple method to do this?

 Working on the lightness (Y).
 
> I tried to derive a color balancing formula from RGB<->YUV matrix.
> However, it seems that direct transformation is very complicated.
>
> From http://www.siliconimaging.com/RGB%20Bayer.htm, I know that color
> balancing in YUV should be possible by derived operations:
> "Using derived operations in the YUV domain, one can perform white
> balance and color correction directly in the YUV domain, without
> switching back to the RGB domain."

 If the problem isn't the lighting but really the COLOR balance you
can look for the retinex method that olso can give color balancing
functionalities.

 By, I hope to be usefull for you, IlGab!!!

-- 
/\/\/\/\/\/\/\/\/\/\/\/\/\/\
   ilGabbio@katamail.com
\/\/\/\/\/\/\/\/\/\/\/\/\/\/