how to take the average of more than two histograms

1 回表示 (過去 30 日間)
Aswathy K V
Aswathy K V 2015 年 4 月 16 日
回答済み: hawkar kheder 2019 年 1 月 5 日
I have calculated 8 histograms using hist function. But I want to take the average of these histograms. Is it possible?. Please help me to find it.

回答 (1 件)

hawkar kheder
hawkar kheder 2019 年 1 月 5 日
Hi, I give you an example that is the average histogram for 3 planes (R,G,B) of an image (I), You can change the histogram for multiple images as you need.
I=imread("filename");
r = I(:,:,1); g = I(:,:,2); b = I(:,:,3);
[counts1,nb] = imhist(r);
[counts2,nb] = imhist(g);
[counts3,nb] = imhist(b);
Average_counts = round(mean([counts1(:), counts2(:), counts3(:)], 2));

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by