I have Y,Cb,Cr values each of 8 bit, can you give me simple C function which converts it to R,G,B each of 8 bit.
Here is a prototype of it.
void convertYCbCrToRGB(
unsigned char Y,
unsigned char cg,
unsigned char cb,
unsigned char &r,
unsigned char &g,
unsigned char &b);
P.S
I am looking for correct conversion formula only. Because I am finding it different everywhere. Even I am also expert in C,C++
The problem comes that nearly everybody confuses YCbCr YUV and YPbPr. So literature you can find is often crappy. First you have to know if you really have YCbCr or if someone lies to you :-).
YPbPr and YCbCr are related. Here are the right formulae:
https://web.archive.org/web/20180421030430/http://www.equasys.de/colorconversion.html
(the archive.org has been added to fix the old, broken link).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With