Changing the hue and saturation of the image by RGB or YUV

                                                      Changing the hue and saturation of the image by RGB or YUV                                             

He had tried to turn into BGR HSV, and then change the S component, but the effect is very poor, here is what I found in the papers of others, your reference

 

1. By changing the saturation of the YUV image, here typically range r is (0, 5), is expressed as 1 if the image data is not changed    

Formula is as follows:

Y = Y;

U = U*r;

V = V * r;

Note: This U ~ (-128- 128), V ~ (-128-128) if your UV range is 0-255 or 16-240, then you need to subtract 128.

 

Renderings:

 

 

2. By changing the range of the saturation degree r RGB image is generally (-1, + 5)

official:

B = B + (B-(R+G)/2)*r;
G = G + (G-(R+B)/2)*r;
R = R + (R-(B+G)/2)*r;

Renderings:

wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw ==

 

 

3. Change the image by yuv hue (Cb is, U, Cr namely V) UV∈ (-128,128)

wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw ==

 

Changing the hue and saturation of the image by RGB or YUV

Published 49 original articles · won praise 138 · Views 300,000 +

Guess you like

Origin blog.csdn.net/lz0499/article/details/101013338