On Wed, Aug 25, 2004 at 05:27:59AM -0400, Paul Norton wrote:
> off on a tangent! CYM/CYMK is a printing thing, being more appropriate as
> dyes absorb light, whereas monitors create it (i.e. CYM mixes absorptions
> to create a colour, and RGB mixes light)
>> YCrCb is an alternative way of representing RGB, and seems fairly common
> in the video area. Y is the luminance, Cr is the red-chrominance, and Cb
> is the blue chrominance. The technique takes advantage of the fact that
> the human eye is more sensitive to luminance than chrominance, so you can
> bin some of the chrominance information without much perceived loss of
> quality.
>> This is usually demonstrated by reducing the number of bits of the
> chrominance channels.
>> video takes advantage of it by storing less samples of Cr and Cb than Y.
>http://www.thedirks.org/v4l2/v4l2fmt.htm> has a better description than I could give of what's going on with the
> video stuff.
>> Surely there must be existing GPL code for converting an RGB frame to
> YUV/YCrCb ?! (or vice-versa)
Yes, yes there is.
On a scale of zero to 1:
Y = 0.299(R) + 0.587(G) + 0.114(B)
Cb = (B-Y) / 1.772 + 0.5
Cr = (R-Y) / 1.402 + 0.5
Or, on a scale of 0 to 255:
Y = (77R + 150G + 29B) / 256
Cr = (131R - 110G - 21B) / 256 + 128
Cb = (-44R - 87G + 131B) / 256 + 128
Either way, I still end up with a buggered image. Anyone got any
ideas?
http://forum.canopus.com/showflat.php?Cat=&Number=32745&Main=32260
Gary (-;