P
Pearce Pearce
Hey guys!
I have an univercity exersise:
I'm trying to get YUV channels from BMP picture, and output it like 3
grey images.
I know the proportion:
RGB to YUV
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
But don't know how to get it works with Ruby.
Thanks in advance!
I have an univercity exersise:
I'm trying to get YUV channels from BMP picture, and output it like 3
grey images.
I know the proportion:
RGB to YUV
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
But don't know how to get it works with Ruby.
Thanks in advance!