shannon entropy and entropy of grayscale
3 ビュー (過去 30 日間)
古いコメントを表示
How can i find the entropy of a gray image without using the "entropy(I)" , "entropy" command? with just codes and arrays?

採用された回答
the cyclist
2023 年 4 月 8 日
I = imread('image.png');
figure
imagesc(I)
% Using histogram from imhist
p = imhist(I);
p = p/numel(I);
p(p==0) = [];
entropyFromImhist = -sum(p.*log2(p))
% Built-in entropy function
entropy(I)
0 件のコメント
その他の回答 (1 件)
埃博拉酱
2023 年 4 月 8 日
Entropy.m is open source, why don't you just check out its source code?
edit entropy
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
