-
Notifications
You must be signed in to change notification settings - Fork 5
/
histentropy10.m
34 lines (33 loc) · 1.02 KB
/
histentropy10.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%% HISTENTROPY10 - Entropy feature derived from (co)occurrence matrices.
%
%% Description
% Compute the entropy feature defined in [HSD73] from (co)occurrence matrices
% following the same formula as the function |HISTENTROPY2|, but using the
% the $\log$ in base 10 instead.
%
%% Syntax
% E = HISTENTROPY10(Pij);
%
%% References
% See |HISTCONTRAST|.
%
%% See also
% Related:
% <HISTCONTRAST.html |HISTCONTRAST|>,
% <HISTENERGY.html |HISTENERGY|>,
% <HISTHOMOGENEITY.html |HISTHOMOGENEITY|>,
% <HISTVARIANCE.html |HISTVARIANCE|>,
% <HISTENTROPY2.html |HISTENTROPY2|>,
% <HISTMAXIMUM.html |HISTMAXIMUM|>,
% <HISTMEAN.html |HISTMEAN|>,
% <HISTDISSIMILARITY.html |HISTDISSIMILARITY|>,
% <HISTIDIFFERENCE.html |HISTIDIFFERENCE|>,
% <HISTCORRELATION.html |HISTCORRELATION|>,
% <LOCALGLCM2D.html |LOCALGLCM2D|>,
% <LOCALGLOV2D.html |LOCALGLOV2D|>,
% <LOCALGLSDV2D.html |LOCALGLSDV2D|>.
%% Function implementation
function E = histentropy10(pIJ, varargin)
pIJ(pIJ==0) = 1;
E = - sum(log10(pIJ(:)) .* pIJ(:));
end % end of histentropy10