estimation/measure of entropy

5 ビュー (過去 30 日間)
Durga
Durga 2014 年 11 月 28 日
回答済み: Behrang Mehrparvar 2015 年 5 月 10 日
How to calculate entropy of an image without using the inbuilt functions? Entropy is the measure of loss of information.
-summation(P.*log2 P)
P is the count of histogram..but not getting the proper result!Anyone plz help.

採用された回答

Thorsten
Thorsten 2014 年 11 月 28 日
編集済み: Thorsten 2014 年 11 月 28 日
Make sure you run log2 only on values > 0. Otherwise you would get NaN.
I = im2double(rgb2gray(imread('peppers.png')));
P = hist(I(:), linspace(0, 1, 256)); P = P(:); P = P(P(:)>0);
E = -sum(P.*log2(P))
  4 件のコメント
Youssef  Khmou
Youssef Khmou 2014 年 11 月 29 日
that is an efficient technique for controlling the histogram.
Durga
Durga 2015 年 1 月 13 日
Thanks a lot for helping me to understand.

サインインしてコメントする。

その他の回答 (1 件)

Behrang Mehrparvar
Behrang Mehrparvar 2015 年 5 月 10 日
this link might be useful in setting the bin size [ link ]

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by