RETRO commands


PROGRAM NAME

vspatial - Compute Spatial Features Using NxM Window (K1)

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: apply the Mean Spatial Operator
default: true
-s
type: boolean
desc: apply the Angular 2nd Moment Spatial Operator
default: false
-c
type: boolean
desc: apply the Contrast Spatial Operator
default: false
-v
type: boolean
desc: apply the Variance Spatial Operator
default: false
-e
type: boolean
desc: apply the Entropy Spatial Operator
default: false
-d
type: boolean
desc: apply the 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

RESTRICTIONS

All input images must be of data storage type BYTE.

All output images are of data storage type FLOAT.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.