1 | initial version |
Maybe a little late... but the conversion is like this..
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
Cr = V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
Cb = U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
Basically a greyscale image in bgr format repeats the component of grayscale three times to create a 3 channel image, so in order to convert from a grey8 image to YUV
Y = grayValue + 16
Cr = V = 128
Cb = U = 128