BaseMeanCalculator |
|
EntropyParamCalculator |
This class is designed to compute the entropy of each patch of the
given BufferedImage , based on the following formula:
E = - SUM{p(z_i)* log_2(p(z_i))}
where:
p: the histogram of this patch.
|
FractalDimParamCalculator |
This class is designed to compute the Fractal Dimension parameter for
each patch of the given BufferedImage .
|
KurtosisParamCalculator |
This class is designed to compute the kurtosises of each patch of the
given 2D array , based on the following formula:
Mu_4 = SUM{((z_i - m)^4) * p(z_i)}
or to be precise, using Kurtosis
in Apache library:
{ [n(n+1) / (n -1)(n - 2)(n-3)] SUM[(x_i - m)^4] /
std^4 } - [3(n-1)^2 / (n-2)(n-3)]
where:
p: the histogram of this patch.
|
MeanParamCalculator |
This class is designed to compute the mean of each patch of the given
2D array , based on the following formula:
m = (1/L) * SUM{z_i}
where:
L: the total number of pixels in this patch.
|
RelativeSmoothnessParamCalculator |
This class is designed to compute the relative smoothness of each
patch of the given BufferedImage , based on the following
formula:
R = 1 - (1 / (1 + σ ^ 2)
where:
σ^2: the variance of this patch (, which depends on the mean
intensity value of that patch).
|
SkewnessParamCalculator |
This class is designed to compute the skewness of each patch of the
given BufferedImage , based on the following formula:
μ _3 = SUM{((z_i - m)^3) * p(z_i)}
or to be precise, using Skewness
in Apache library:
[n / (n -1) (n - 2)] SUM[(x_i - mean)^3] / std^3
where:
p: the histogram of this patch.
|
StdDeviationParamCalculator |
This class is designed to compute the standard deviation of each patch
of the given 2D array , based on the following formula:
σ = sqrt{(1/(L-1)) SUM{(z_i - m)^2}}
where:
L: the total number of pixels in this patch.
|
TContrastParamCalculator |
This class is designed to compute the Tamura Contrast of each patch of
the given BufferedImage , based on the following formula:
C = (σ ^ 2)/(μ4 ^ 0.25)
where:
σ^2: the variance of intensity values in this patch.
|
TDirectionalityParamCalculator |
This class is designed to compute Tamura Directionality parameter of
each patch of the given BufferedImage , based on a MatLab
implementation which is copied below:
function Fdir = Tamura_Directionality(Im),
[gx,gy] = gradient(Im);
[t,r] = cart2pol(gx,gy);
nbins = 125;
r(r<.15.*max(r(:))) = 0;
t0 = t;
t0(abs(r)<1e-4) = 0;
r = r(:)';
t0 = t0(:)';
Hd = hist(t0,nbins);
nrm = hist(r(:).^2 + t0(:).^2, nbins);
fmx = find(Hd==max(Hd));
ff = 1:length(Hd);
fmxNew = ones(size(ff)) .* fmx; %added by me
%ff2 = (ff - fmx).^2;
ff2 = (ff - fmxNew).^2; %added by me
Fdir = sum(Hd.*ff2)./sum(nrm);
Fdir = abs(log(Fdir+eps));
return;
Note: Unlike what was assumed in the several implementations of this
parameter, the histogram of the images after having the Gradient filter on,
does not have one single prominent peak.
|
UniformityParamCalculator |
This class is designed to compute the uniformity of each patch of the
given BufferedImage , based on the following formula:
U = SUM{(p(z_i))^2}
where:
p: the histogram of this patch.
|