the program is for pseudocolor image processing, it can convert a grayscale image to color. The color may not be accurate but quite useful for certain applications.
i want to see the program
this program was never designed to provide you near true colors, human eyes can distinguish only few shades of grey while they can distinguish thousands of colors, so this program has been only to provide pseudo colors not the real colors
This code is not valid for other images. We are unable to get at least near true color for the images.
you have to make small modification in my program
after the 'for' loops start make changes to the 'if' loops below and replace
if (y(i,j)>= 0) && (y(i,j)< 18)
elseif (y(i,j)>= 18) && (y(i,j)< 36)
with your desired gray level values and you will get the desired result
Hi,how if I want to assign the grayimage into four different RGB color, let say respectively 0~63, 64~127, 128~191, 192~255 become blue(001),magenta(101),green(010),and red(100). thanks