int lvpml(
xvimage *img,
xvimage *img1,
xvimage *fd_img,
kfile *printdev,
int lower,
int upper,
int step,
int range_q)
All selected moments (q) of the P(m,L) distributions for each of the desired window sizes are determined, and a linear regression or "best fit line" is found for the moment generating function, log(M(L))^1/q, versus the log of the window size, log(L). The slope of the "best fit line" provides an estimate for the fractal dimension, D.
The center pixel of the largest window, Lmax, is replaced with the computed fractal dimension based on the probability density function, P(m,L). The largest window size, Lmax, determines the resulting size of the fractal dimension image. This results in a border of size (Lmax / 2) around the image, which is set to zero.
The input image MUST be of data storage type BYTE or INTEGER.
The input arguments are described as follows:
img specifies the input image, which must be of data type BYTE or INTEGER. The input image must be a single band image.
img1 specifies the output image, which will be a multiband image representing the fractal dimension of the input image for each of the specified moments. The resulting output image will be of data storage type FLOAT, and will have a border of pixels of value zero. The size of the border will be determined by the size of the largest window specified. This can be determined from the following formulation, (Lmax -1) / 2 = border size. Where Lmax is the size of the largest window used. For example, if the largest window size is 9, then the border size will be (9 - 1) / 2 = 4 pixels.
fd_img specifies fractal dimension image, representing the fractal dimension vectors for each class and moment. This image will always have a row size of 1 and a column size determined by the number of classes in the input image. The number of data bands will be equal to the number of moments used in the estimation of the fractal dimension.
printdev uses an ASCII file as output for the image information specifying the size of the input image, number of classes in the input image, and the range of moments used in the estimation of the fractal dimension. Also included is a listing of the fractal dimensions for each class and moment.
lower specifies the initial or lower size of the sliding window. This MUST be an odd number resulting in a window with a center pixel. This means that the minimum size of the sliding window is 3 x 3. The default value is 3, resulting in an initial window size of 3 x 3.
upper specifies the final or upper size of the sliding window. This MUST also be an odd number resulting in a window with a center pixel. The size of the upper window MUST be at least one step greater than the lower window size. That is, if the lower window is 3 x 3, then the minimum size of the upper window must be 5 x 5, or one step greater than the lower window. This is necessary, since there must be at least two points for a best fit line to be formed determining the slope and ultimately the fractal dimension.
step specifies the step size or interval used when specifying a range of window sizes. The default value is two, corresponding to the next odd window size with a center pixel. This may be helpful when a wide range of window sizes is required, as it will reduce the number of points generated for the best fit line and hence the number of calculations.
range_q specifies the range of moments to base the P(m,L) fractal dimension calculations on. This must be an odd number, corresponding to the number of moments centered on zero. For example, a value of 5 would result in the computation of the fractal dimension for the range of moments, -2, -1, 0, 1, 2. The default value is 3, resulting in the range of -1, 0, 1.
none
none
$RETRO/objects/library/vipl/src/lvpml.c