|
Hi guys,
We can convert an RGB image to Gray scale using the
following equation
GrayScaleImage[ ] = 0.299 * red + 0.587 * green + 0.114 *
blue
We know that in RGB image, we have to play with 3
Matrixes, Red, Green and Blue. But in gray scale image, we have to play with
only one matrix. In Matlab 7.0, there are some functions in its image
processing toolbox.
1. rgb2gray().
2. gray2rgb().
I have made the first function in C#.NET 2005 using
the above equation but how can we convert a gray scale image to RGB. Since we
know that in the case of rgb2grayscale(), there is some loss of data (3
matrixes to 1 matrix) but in the case of grayscale2rbg(), we have to
recover the loss data and make 3 matrixes from 1 matrix of gray scale image.
Sir, how can we achieve this.
Is there any mathematical equation for convert
gray scale to RGB.
I think it must be because the 2nd funtion in above(
gray2rgb()) of image processing toolbox is already doing this thing in Matlab. Likewise
Discrete Cosine Transform its inverse Transform is also exist through which we
can recover the original image with few chunks of numeric values.
|