Technical Discussions related to Image Processing (image coding, compression, digital effects, mpeg, etc)
Post a new Thread
Color histogram - zary...@yahoo.com - Aug 31 5:50:00 2005
Hello,
I need help on creating a color histogram in Matlab. Now, I understand that for using the
imhist(), it can only be used for grayscale or indexed images right? Thus we first need to
convert it, say from RGB to index by using rgb2ind function.
I've created color histogram, but I'm not sure on how to read it. Or rather, i'm not really
sure if this is the correct color histogram. Here's some codes to illustrate my problem.
RGB = imread('7.jpg');
[X,map] = rgb2ind(RGB,256);
imhist(X);
colorbar;
colormap(map)
the image source is -> http://server3.uploadit.org/files/zaryl2-7.jpg
the color histogram -> http://server2.uploadit.org/files/zaryl2-colhist.jpg
Please tell me whether I've constructed the correct color histogram or not. If not, then can
you guys tell me the correct method of creating one.
Thanks!
Zaryl

(You need to be a member of imagedsp -- send a blank email to imagedsp-subscribe@yahoogroups.com )