HISTCORRELATION - Correlation feature derived from (co)occurrence matrices.
Contents
Description
Calculate the correlation feature defined in [HSD73] from (co)occurrence matrices.
This feature measures the correlation C of pixel pairs on greylevels as [ST99]:
- GLCM case - with the local statistics
,
,
and
based on the greylevel joint probability
of the greylevel pair
: $$ C = \sum_{i,j} ((i-\mu_i) \cdot (j-\mu_j) \cdot P_{ij}) ) / (\sigma_i \cdot \sigma_j)
- GLSDV case - with the local statistics
,
and
based on the probabilities
and
of the greylevel sum
and difference
respectively :
Syntax
C = HISTCORRELATION(pD, D); C = HISTCORRELATION(pIJ, I, J);
References
See HISTCONTRAST.
See also
Ressembles: HISTCONTRAST, HISTENERGY, HISTHOMOGENEITY, HISTVARIANCE, HISTENTROPY2, HISTENTROPY10, HISTMAXIMUM, HISTMEAN, HISTDISSIMILARITY, HISTIDIFFERENCE, LOCALGLCM2D, LOCALGLOV2D, LOCALGLSDV2D.
Function implementation
function C = histcorrelation(pIJ,I,varargin) muI = sum(I .* pIJ); sI = sum((I-muI).^2 .* pIJ); if nargin>2 J = varargin{1}; muJ = sum(J .* pIJ); sJ = sum((J-muJ).^2 .* pIJ); else % J = I = D J = I; muJ = muI; sJ = sI; end % Correlation = sum_i( sum_j( ((ij)p(i,j) - u_x.u_y) / (s_x.s_y) ) ) (p[2]) % C = sum (I .* J .* pIJ - muI .* muJ) / sqrt(sI * sJ); % Correlation = sum_i( sum_j( (i - u_i)(j - u_j)p(i,j)/(s_i.s_j) ) ) (m) C = sum ((I - muI) .* (J - muJ) .* pIJ) / sqrt(sI * sJ); end % end of histcorrelation