YCbCr - RGB from matrix table

Below is a matrix for converting RGB to YCbCr. Can you tell me how can I get the formula for converting YCbCr to RGB? I mean, I have a YCbCr value and I want to get RGB. RGB to YUV Image

+3
source share
4 answers

If you ask how the formula is obtained, you can search for “color coordinate systems”. This page contains a good discussion in the YCbCr space in particular.

, , . ( "" ) ​​ , RGB, - . YCbCr Y , Cb Cr - . Cb , Cr .

YCbCr , , . , JPEG, , , .

: . ( , .) RGB YCbCr, :

r   =   1.0 * y'    + 0 * cB    + 1.402 * cR
g   =   1.0 * y'    - 0.344136 * cB - 0.714136 * cR
b   =   1.0 * y'    + 1.772 * cB    + 0 * cR
+4

round, M :

alt text

.

+2
Y = 0.2126*(219/255)*R + 0.7152(219/255)*G + 0.0722*(219/255)*B + 16
CB = -0.2126/1.18556*(224/255)*R - 0.7152/1.8556(224/255)*G + 0.5*(219/255)*B + 128
CR = 0.5*(224/255)*R - 0.7152/1.5748(224/255)*G - 0.0722/1.5748*(224/255)*B + 128
+1
source

http://www.fourcc.org/fccyvrgb.php has YUV to RGB conversions.

+1
source

Source: https://habr.com/ru/post/1771683/


All Articles