vspatial(1)

PROGRAM
vspatial - Spatial Feature Operators

SYNTAX

vspatial

-i  input image filename

-o  output image filename

[-w]
    window width argument

[-h]
    window height argument

[-m]
    choose Mean Spatial Operator

[-v]
    choose Variance Spatial Operator

[-c]
    choose Contrast Spatial Operator

[-s]
    choose Ang 2nd Moment Spatial Operator

[-e]
    choose Entropy Spatial Operator

[-d]
    choose Dispersion Spatial Operator

[-V]
    Gives the version for vspatial

[-U]
    Gives the usage for vspatial

[-P]
    Prompts for command line options

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

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

DESCRIPTION
vspatial performs a spatial feature extraction on an image using a selected statistical operation. The statistical operation is computed, using overlapping windows, over the entire image. The center pixel is updated in each window based on the calculated statistics of that window.

The input image, which must be of data storage type BYTE, corresponds to the -i argument. The output image, which corresponds to the -o argument, is stored as data type FLOAT. The output image may be a multiband image depending on how many spatial operators were selected. The resulting image will have a border of pixels of value 0, since the window operation does not calculate values for border pixels.

The width and height of the window is specified by the -w and -h window width and height arguments. The width and height arguments cannot be an even number. The window dimensions must be odd (ie. 3x3, 5x5, 7x7, etc.), since the center pixel is replaced with the computed value of the window data. The default window size is 3x3.

Each pixel in the image is updated with a computed value except the border pixels. A 3x3 window will result in a border of one pixel, a 5x5 window will result in a border of two pixels, etc.

There are six statistical operations that may be selected. Any combination of the statistical operations may be selected by toggling the desired argument on (ie. argument followed by a 1). The default for each argument is unselected (ie. argument followed by a 0), except -m (mean), which is selected. The six possible statistical operations and their arguments are:

  -m -- calculates the mean of the image.
  -v -- calculates the variance of the image.
  -c -- calculates the contrast of the image.
  -s -- calculates the angular second moment of the image.
  -e -- calculates the entropy of the image.
  -d -- calculates the dispersion of the image.

The resulting feature vector may contain from one to six bands of data, depending upon the number of arguments selected.

All input images must be of data storage type BYTE.

All output images are of data storage type FLOAT.

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image filename

-o  type: outfile
    desc: output image filename

OPTIONAL ARGUMENTS

-w  type: integer
    desc: window width argument
    default: 3
    bounds: 1 < [-w] < 64

-h  type: integer
    desc: window height argument
    default: 3
    bounds: 1 < [-h] < 64

-m  type: boolean
    desc: choose Mean Spatial Operator
    default: true

-v  type: boolean
    desc: choose Variance Spatial Operator
    default: false

-c  type: boolean
    desc: choose Contrast Spatial Operator
    default: false

-s  type: boolean
    desc: choose Ang 2nd Moment Spatial Operator
    default: false

-e  type: boolean
    desc: choose Entropy Spatial Operator
    default: false

-d  type: boolean
    desc: choose Dispersion Spatial Operator
    default: false

EXAMPLES
vspatial -i input_image.xv -w 5 -h 5 -m 0 -v 1 -e 1 -o output_image

the input image must of type BYTE; the selected width and height of the window is 5 x 5, which will result in a border width of two pixels in the output image. The mean spatial operator is unselected (default is selected), and the variance and entropy operations are selected, which will result in an output image (feature vector) of 2 bands, based on the operations selected.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvspatial(3)

RESTRICTIONS

All input images must be of data storage type BYTE.

All output images are of data storage type FLOAT.

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