필터 지우기
필터 지우기

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 CenterFile Exchange에서 Spatial Search에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by