
vfractal(1)                  Khoros                   vfractal(1)

PROGRAM
     vfractal - Fractal Feature Extraction

SYNTAX
     vfractal

     -i             input image filename

     -o             output image filename

     [-r]           region size argument

     [-w]           initial window size argument

     [-s]           step size argument

     [-V]           Gives the version for vfractal

     [-U]           Gives the usage for vfractal

     [-P]           Prompts for command line options

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

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

DESCRIPTION
     vfractal performs a fractal feature extraction of an image
     via calculation of the fractal dimension "D".  The fractal
     dimension is computed based on a calculation of the Hurst
     coefficient within a selected window size or "fractal
     region" of the image.  The Hurst coefficient is a measure of
     the slope of the line relating the window size vs average
     range of image intensity.  The Hurst coefficient is related
     to the fractal dimension as follows,

                                  D = 3 - H
         where,
                 D  -  is the resulting fractal dimension
                 H  -  is the computed Hurst coefficient
                 3  -  constant related to the Euclidean geometry

     The fractal dimension operation is computed, using overlap-
     ping windows, over the entire image.  A range of window
     sizes up to one third of the size of the fractal region are
     used to compute the fractal dimension. The center pixel in
     each fractal region is updated based on the Hurst coeffi-
     cient and subsequent fractal dimension calculation for that
     region.

     The input image, which must be of data storage type FLOAT,
     corresponds to the -i argument.  The output image, which
     corresponds to the -o argument, is stored as data type
     FLOAT.  The resulting output image will be a single band
     image, and will have a border consisting of pixels of value
     0, since the window operation does not calculate values for
     border pixels.

     The size of the window for the "fractal region" is specified
     by the -r region size argument.  The region size argument
     cannot be an even number.  This means that the region dimen-
     sions must be odd (ie. 15x15, 17x17, etc.), since the center
     pixel is replaced with the computed value of the window
     data.  The default region size is 15x15.

     The initial size of the sliding window in the fractal region
     is specified by the -w initial sliding window size argument.
     The size of the sliding window cannot be less than 2 and
     cannot exceed 2 minus the upper window size.  The upper win-
     dow size is determined by the region size, and cannot exceed
     one-third of the region size.  The size of the lower window
     cannot exceed 2 minus the upper window size, because at
     least two points are needed to calculate the slope of the
     best fit line.

     The step size specifies the increment to use when increment-
     ing the sliding window size from the initial size (-w argu-
     ment) to the upper window size (determined from the region
     size).  The step size cannot exceed a value that would
     prevent at least two points from being used to calculate the
     slope of the best fit line.  The step size is specified by
     the -s step size argument.

     Each pixel in the image is updated with a computed value
     except the border pixels.  A 15x15 window will result in a
     border of seven pixels, a 17x17 window will result in a
     border of eight pixels, etc.

     The resulting feature vector will contain one band of data,
     which contains the computed fractal dimension "D" of the
     image intensity data for the particular region size
     selected.  Note that different results may be obtained by
     varying the region size and initial size of the sliding win-
     dow.

     Comments - To calculate the overall fractal dimension of an
     image, set the region size to be the same size as the image
     (Note: region size must be odd), and use an initial sliding
     window size about one-fourth to one-third of the region
     size.  This will result in one value for the fractal dimen-
     sion of the image, which can be obtained from running
     vstats.

     When running this algorithm on a large image using a wide
     range of sliding window sizes, it may be helpful to use a
     generous step size to speed up the processing of the image.
     For example, if a 256 by 256 image is being processed with a
     region size of 65 and an initial sliding window size of 3,
     it may be helpful to select a step size of about 6.  The
     following window sizes would be used in the calculation of
     the Hurst coefficient (slope of best fit line):  window
     sizes --> 3  9  15  21

     If finer resolution is needed, a smaller step size should be
     used at the expense of processing time.

     To view the resulting fractal dimension image in 3-D, use
     Xprism3 to plot the image as a surface plot.

     The input image MUST be of data storage type FLOAT.

     The output image is of data storage type FLOAT.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input image filename

     -o     type: outfile
            desc: output image filename

OPTIONAL ARGUMENTS
     -r     type: integer
            desc: region size argument
            default: 15
            bounds: value > 0

     -w     type: integer
            desc: initial window size argument
            default: 2
            bounds: value > 0

     -s     type: integer
            desc: step size argument
            default: 1
            bounds: value > 0

EXAMPLES
     vfractal -i input_image.xv -o output_image -r 65 -w 3 -s 6

     the selected window size of the fractal region is 65 x 65,
     which will result in a border width of 32 pixels in the out-
     put image.  The initial starting size of the sliding window
     is 3 x 3, and will range in size up to one-third of the
     region size, or 21 x 21 in this case.  The step size is 6,
     which will result in window sizes of 3, 9, 15, and 21 to be
     used in the calculation of the Hurst coefficient.  Note that
     a tradeoff between resolution of the best fit line and pro-
     cessing time was made by using a step size of 6.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvfractal(3)
     vgfractal(1)

RESTRICTIONS
     vfractal will only operate on images of data storage type
     FLOAT.
     The output image is of data storage type FLOAT.

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

Khoros                    Release: 1.0                          1

