Forum Discussion
Altera_Forum
Honored Contributor
15 years agoadding color to grey scale video
Hello, I have a system that generates 8-bit grey scale video. The frame data is in ram, 8-bit grey scale 656 format. Depending upon the value of each pixel I want to be able to colorize the data. ...
Altera_Forum
Honored Contributor
15 years agoYou will need to take your RGB value and convert it to YCbCr via a colour space converter, or just have a set of preset YCbCr values. Then you will need to convert it to 444 to 422 video for output (assuming you're using NTSC or PAL).
Colour space conversion is a matrix transform using the following matrix:
(Y ) = ( 0.299 , 0.587 , 0.114 , 0.0 ) (R)
(Cb) ( -0.147 , -0.289 , 0.436 , 128.0 ).(G)
(Cr) ( 0.615 , -0.515 , -0.1 , 128.0)) (B)
(1)