Matlab function for color palatte
Hi
I would like to know if there is a MATLAb function (may be in the
image processing toolbox)to apply a specific (custmized) color palatte
to an image.
Eg:If i have to apply a color paltte
P=[2 30 55;30 49 60;23 155 230]; where the 3 coloumns represent the
possible values for R,G and B respectively.
It may be seen as forced color reduction. In this example instead of
having anumber of values for red i want to restrict it to 3 values -
2,30 and 23. Similarly for G and B. and thsu reduce the colors in the
image.
...This is just an example to explain my problem.
One way is to write code in MATLAB to chk the RGB values of each pixel
and replace it with the nearest value in the required color
palatte(P). But i want to know if a function exists in MATLAB to do
this.
Thanks
Nithin
|