Plot multiple histograms in one figure and re-plot the overlay histogram

9 views (last 30 days)
Lim
Lim 上9 Jul 2015
Commented: Lim2015年7月22日
I used the code provided by Image Analyst to plot multiple RGB histograms in one figure, the result is shown in the following figure.
I want plot a new histogram based on the overlaid histograms. I don't know how to put it in words about what I want to do but it is something like this...
I'm notsure how to do it. Can anyone help me please?
3 Comments
Lim
Lim 2015年7月22日
Image = imread('001.bmp');
Red = Image(:,:,1);
Green = Image(:,:,2);
Blue = Image(:,:,3);
[PixelCountred Graylevels] = IMHIST(红色,256);
[pixelCountGreen grayLevels] = imhist(Green, 256);
[pixelCountBlue grayLevels] = imhist(Blue, 256);
情节(PixelCountred,'r');
hold;
情节(pixelCountGreen,'g');
情节(pixelCountBlue,'b');
Until this point, it will develop a plot with three histogram in one figure, as shown in figure above. May I know how do I plot the maximum lines of the histogram so it shows one graph with six peaks (as in the example figure)?

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

开始狩猎!