RETRO (vipl) functions


LIBRARY ROUTINE

lvspatial - Perform spatial feature extraction of an image via statistical analysis of window pixels.

LIBRARY CALL

int lvspatial(
	xvimage *img,
	int xsize,
	int ysize,
	int m,
	int v,
	int c,
	int s,
	int e,
	int d)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) on failure

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 toggeling the desired argument on (ie. argument followed by a 1). The default for each argument is unselected (ie. argument followed by a 0). 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.

The spatial feature operations were based on the definitions presented in:

"Fundamentals of Digital Image Processing" by A.K. Jain, Prentice-Hall, 1989.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

All input images must be of data storage type BYTE. All output images are of data storage type FLOAT.

MODIFICATION

none

FILES

$RETRO/objects/library/vipl/src/lvspatial.c

SEE ALSO

vipl(3)

COPYRIGHT

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