
vpml(1)                      Khoros                       vpml(1)

PROGRAM
     vpml - Estimates the Fractal Dimension of an image based on
     the P(m,L)

SYNTAX
     vpml

     -i             input image

     -o1            resulting multiband fractal dimension output
                    image

     -o2            output image specifying the fractal dimension
                    of each class

     [-f1]          output file for P(m,L) statistics

     [-l]           select the initial size of the sliding window

     [-u]           select the final size of the sliding window

     [-s]           select the window step size or interval

     [-q]           select the range of moments (-r/2 <= 0 >=
                    r/2)

     [-V]           Gives the version for vpml

     [-U]           Gives the usage for vpml

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vpml.ans or
                    file1

     [-a [file1]]   Uses vpml.ans or file1 as the answer file

DESCRIPTION
     vpml estimates the fractal dimension of an image based on
     the probability that there are m pixels within a window of
     size L centered on a pixel from a particular class.  For a
     selected range of window sizes (L), the window is centered
     on the first occurrence of the pixel belonging to a particu-
     lar class.  The number of pixels within a window of size L,
     belonging to a specific class are counted (including the
     center pixel of the window), and a "histogram" is formed as
     the window is moved over the image.  This "histogram"
     represents the total number of occurrences, m, of a class of
     pixels in a window of size L.  From this, a normalized his-
     togram is formed, which yields an estimate of the probabil-
     ity density function, P(m,L), for each window size L.

     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" pro-
     vides 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 arguments are described as follows:

     -i             specifies the input image, which must be of
                    data type BYTE or INTEGER. The input image
                    must be a single band image.

     -o1            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.

     -o2            specifies fractal dimension image, represent-
                    ing the fractal dimension vectors for each
                    class and moment.  This image will always
                    have a row size of 1 and a column size deter-
                    mined 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.

     -f1            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 estima-
                    tion of the fractal dimension.  Also included
                    is a listing of the fractal dimensions for
                    each class and moment.

     -l             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 slid-
                    ing window is 3 x 3.  The default value is 3,
                    resulting in an initial window size of 3 x 3.

     -u             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 win-
                    dow size.  That is, if the lower window is 3
                    x 3, then the minimum size of the upper win-
                    dow 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.

     -s             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 win-
                    dow sizes is required, as it will reduce the
                    number of points generated for the best fit
                    line and hence the number of calculations.

     -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.

     The input image MUST be of data storage type BYTE or
     INTEGER.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input image

     -o1    type: outfile
            desc: resulting multiband fractal dimension output
            image

     -o2    type: outfile
            desc: output image specifying the fractal dimension
            of each class

OPTIONAL ARGUMENTS
     -f1    type: outfile
            desc: output file for P(m,L) statistics

     -l     type: integer
            desc: select the initial size of the sliding window
            default: 3
            bounds: 3 < [-l] < 10000

     -u     type: integer
            desc: select the final size of the sliding window
            default: 5
            bounds: 5 < [-u] < 10000

     -s     type: integer
            desc: select the window step size or interval
            default: 2
            bounds: 2 < [-s] < 10000

     -q     type: integer
            desc: select the range of moments (-r/2 <= 0 >= r/2)
            default: 3
            bounds: 3 < [-q] < 1000

EXAMPLES
     vpml -i in_img -o1 out_img1 -o2 out_img2 -f1 file1 -u 11 -s
     4 -q 5

     this will estimate the fractal dimension of the in_img using
     a range of sliding window sizes from 3 x 3 (default lower
     value of 3) to an upper size of 11 x 11, with a step size of
     4.  This means that windows of size 3 x 3, 7 x 7, and 11 x
     11 will be used in the fractal dimension calculation.  A
     value of 5 was selected for the number of moments to be cal-
     culated, meaning that the fractal dimension will be computed
     for the range of moments, -2, -1, 0, 1, 2.  The resulting
     output image, out_img1 will consist of a five-band FLOAT
     image with each band representing the fractal dimension for
     a particular moment, q.  The out_img2 will consist of a sin-
     gle row, five-band image specifying the fractal dimension
     for each class of the input image and moment, q.  The ascii
     file1 will provide the user with information on the size of
     the input image, number of classes, and the resulting frac-
     tal dimensions for each class and moment.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvpml(3) vfrac-
     tal(1)

RESTRICTIONS
     The input image MUST be of data storage type BYTE or
     INTEGER. The output images are of data storage type FLOAT.

COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

