question: how to work out rgb color intensity of an image?
i have used histogram to show this, however i need an alternative way to show which color has high/low intensity in the image used. is there way to use image pixel/mean/average of each color to code this in matlab? HELP
you can extract all the three color planes using:
R = YourImage(:,:,1); % Red color plane G = YourImage(:,:,2); % Green color plane B = YourImage(:,:,3); % Blue color plane
Yeah you can take mean of the RGB components, this is what happens in HSI color space to denote intensity/Achromatic portion of image ,
I = 1/3*(R+G+B);
also you can follow YCbCr model to get achromatic notion:
Y = 0.2126*R + 0.7152*G + 0.0722*B
It doesn't sound like you simply want to extract each color channel like the answer you accepted suggested. Indeed your comment makes me wonder why you accepted it. Instead it actually sounds like you're describing the "color frequency image". This is an image where the brightness of the image is proportional to how many pixels have that color, which is what it sounds like when you say "show which color has high/low intensity in the image used". Luckily the color frequency image code is in the File Exchange here: http://www.mathworks.com/matlabcentral/fileexchange/28164-color-frequency-image:
Description
This is a MATLAB implementation of the Color Frequency concept introduced by T. Kashiwagi & S. Oe.
With this script, you pick a color image and then it computes the color frequency image. The color frequency image is an image where the pixel intensity represents the frequency of pixels in the original image that have that same pixel color as that pixel location. For example, in the screen shot, the blue sky looks bright because there are a lot of similarly colored blue pixels in the image. Everywhere there is a blue pixel in the original image, it will have a high value in the frequency image because the frequency of blue pixels is high.
1 Comment
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/83753#comment_162474
The question is not clear. Neither repeated character nor a pile of dots can replace real details. What are your inputs? What are the wanted outputs? What have you tried so far and which problems are you still working on?
Please add the details by editing the question, not by adding a comment or a pseudo-answer. Thanks!