Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
|
Re: The mixing formula of RGB
Posted:
Jan 14, 2013 10:09 AM
|
|
"Wenlong " <scc.wwl@gmail.com> wrote in message news:kd0tmi$3m6$1@newscl01ah.mathworks.com... > Hi, all > > I am trying to interpret RGB image format. Currently, I read the .bmp > image with Matlab, and I can see it three layers of red, green, and blue. > But when I try to composite the layers to recover the original image, the > result is significantly different from the original one. > > What I do is simply add the pixel values of red, green and blue, and > divide it by 3. But seems it is not the correct approach. > May I know what is the mixing formula?
If your image is an RGB image, use CAT to concatenate the color pages in the 3rd dimension.
If it is an indexed image, use IND2RGB with the indices and color map data.
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|
|
|