Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- 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. I really have no idea as to how to do that. Does anyone have any suggestions? Thanks --- Quote End --- --- Quote Start --- The video data represents temperature for each pixel so I want to, say for instance, if a particular pixel is above a certain temperature, make that pixel red, or a group of pixels to represent a temp gradient, how would I do that. --- Quote End --- I understand you are trying to beautify the grey-scale image. A way to do this is to traverse one of the six sides of the rgb colour cube (http://http://www.mathworks.com/help/toolbox/images/color7.gif). E.g. to get images form dark-blue for grey-value 0, to fiery-red for grey-value 255, you could use the following formula: R <= grey_value ; B <= 255 - grey_value ; G <= 0 ; Or traverse the colour cube from blue to yellow: start from R=0,B=255,G=0 for grey-value 0 towards R=255,B=0,R=255 for grey-value 255. Of course you can think of other variations ...