반응형
RGB ↔ YUV(YCbCr).
RGB to YUV Conversion
Y = 0.299R + 0.587G + 0.114B
Cb = 0.564(B - Y)
Cr = 0.713(R - Y)
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
Cb = U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
Cr = V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
YUV to RGB Conversion
B = Y + 1.772Cb
G = Y - 0.344Cb - 0.714Cr
R = Y + 1.402Cr
B = 1.164 * (Y - 16) + 2.018 * (U - 128)
G = 1.164 * (Y - 16) - 0.813 * (V - 128) - 0.391 * (U - 128)
R = 1.164 * (Y - 16) + 1.596 * (V - 128)
끗!ㅋ
'Fundamental Notes > Android' 카테고리의 다른 글
Android : OpenGL + Camera (1) | 2010.01.06 |
---|---|
Android : Thread를 이용하여 setVisibility(View.INVISIBLE) (0) | 2010.01.04 |
Android : YUV420 -> RGB Decode 알고리즘 발견 (0) | 2010.01.02 |
Android : YUV420 Format (0) | 2010.01.02 |
Android : toRGB565(byte[] yuvs, int width, int height, byte[] rgbs) (0) | 2010.01.02 |