How to take summation of different bins of histogram
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
anu
am 22 Jul. 2016
Kommentiert: Image Analyst
am 25 Jul. 2016
I am new to Matlab. I have created three separate arrays rarray,garray,barray to store RGB values of an image. After this I have created histogram for these three channels. How take addition of different bins for every channel?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 22 Jul. 2016
I don't know what you mean by "different" bins, but to add up corresponding bins, just add
redCounts = imhist(rgbImage(:,:,1));
greenCounts = imhist(rgbImage(:,:,2));
blueCounts = imhist(rgbImage(:,:,3));
overallCounts = redCounts + greenCounts + blueCounts ;
Of course it's even easier to do it all in one step:
overallCounts = imhist(rgbImage(:));
4 Kommentare
Image Analyst
am 25 Jul. 2016
Neither can we, until we see your code and you upload at least two images.
Weitere Antworten (1)
Azzi Abdelmalek
am 22 Jul. 2016
Bearbeitet: Azzi Abdelmalek
am 22 Jul. 2016
A=randi(10,5,4,3)
B=squeeze(sum(sum(A,1)))
0 Kommentare
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!