Semivar
Purpose
Calculates semivariance for texture analysis.
Synopsis
- [y,s] = semivar(x,s,options)
Description
SEMIVAR calculates the semivariance similar to that used in Kriging, and can be used to characterize texture for the input (x) which is an m by n matrix (e.g. an image layer). The (y) a cell with each element containing a vector of the sqrt(semivariance) and (s) a cell with the associated distance vectors (in pixels). Each cell element corresponds to the semivariance calculated for 4 directions
- y{1}, s{1} is down the rows (top-to-bottom),
- y{2}, s{2} is down the columns (left-to-right),
- y{3}, s{3} is diagonal (upper left-to-bottom right), and
- y{4}, s{4} is diagonal (upper right-to-bottom left).
The semivariance is defined as: with larger semivariance indicating less correlation. Optional input (s) is a 2 element cell containing the distances (in pixels) measures to be calculated. Each cell contains a vector of integers defining the distance in pixels for the rows and columns respectively. Defaults:
- s{1} = 1:floor(m/2); s{3} = s{1}\*sqrt(2);
- s{2} = 1:floor(n/2); s{4} = s{1}\*sqrt(2);
options is a structure discussed below.
Options
options is a structure is a structure array with the following fields:
- flag: [ 'off' | {'on'} ] when set to 'off' the function only calculates the first two semivariances (top-to-bottom and left-to-right). This is faster when (x) is large.
- plots: [ 'none' | {'final'} ] governs level of plotting,
See Also
anglemt, autocor_img, detrend_img, fft_texture, svd_texture, texture