There are different color models but for easiness let us say you want to work with HSI color space.
If you have xy plane then those pixels in all those coordinates belong to I-plane. Now depending upon your color choice you can start filling the pixels on the Saturation (S) and Hue (H) planes. Then you can concatenate using command 'cat'.
Let me try to define the problem a little more precisely. In Yxy , Y is the intensity the same as I in HSI , so that issue is solved. Now problem is of assigning colors to every value of (x,y). This color is assigned on the basis of wavelength and I want to redefine that wavelength color association.
I have grayscale images of same scene but with different intensity values. I want to join them in such a way that difference in intensities can be observed through color.
Hello Haris Ahmed, Please go through these points may helpful to you
The numerical specification of the color of visual stimuli, is related to the spectral sensitivities of the three cone photoreceptors. Colorimetry is more intuitive when defined in terms of cone excitations than when defined in terms of imaginary primaries, such as the CIE XYZ primaries. Color-matching data and CMFs tell us which spectral distributions will match under a given set of viewing conditions for a given observer. However, they tell us little about the actual color appearance of the match, which can vary enormously with the viewing conditions. It has been quantitatively evaluated and outperforms the classical gray world algorithm.
If your problem is :"I have grayscale images of same scene but with different intensity values. I want to join them in such a way that difference in intensities can be observed through color.", you probably want to produce 'false colours' (or 'pseudoclours'). There are various algorithms to do this, depending on which ccinstraints you pose. For instance, if dark colours are very relevant, and you want to enlight them, probably you will like to render them in vivid red, and let lighter grays be yellowish; and if white is irrelevant you may want to let it be blue, and so on. That is ,the choice is on you and depends on your particular need. If it is a picture, there is no possibility to recover the original colours from the white and black reproduction, unless you know how they were ...
other using the pack of functions "colorlab" there, there are a function "true2pal" that convert a image RGB in a image(with the color number) and the palette (colormap) you can change the color of the palette, and then using the function "pal2true" in order to have a real image in RGB.
"I have grayscale images of same scene but with different intensity values. I want to join them in such a way that difference in intensities can be observed through color."
The following MatLab code may be helpful for this problem:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% image1 and image2 are two matrices containing grayscale images
imageDiff = image1-image2;
h=surf(imageDiff);
set(h,'edgecolor','none');
axis off
view(0,90)
%you can use various predefined colormaps defined in MatLab or create your
%own
colormap(jet)
% set color scale if you don't like the MatLab default