convolve

[ XITE Reference Manual | XITE home ]

Name

convolve - perform an n x m convolution

Syntax

 #include <xite/convolve.h>

 BiffStatus convolve( IBAND input, IBAND output,
    ISS_BAND convk, double scale, double offset,
    int verbose );

Description

convolve performs the convolution between a band input and a convolution kernel convk. convk is a signed short band. The result of the convolution is scaled
   pix = (conv. result) * scale + offset;
If scale is zero, an autoscaling is performed. If verbose flag is nonzero, the number of underflows and overflows are printed. If verbose flag is nonzero and autoscaling is performed, the scale and offset values are displayed.

convolve_overflow and convolve_underflow are global variabels and may be declared as
 extern int convolve_overflow, convolve_underflow

See also

ascii2biff(3), convolve(1), conv3x3(3), laplace(3), gradient(3), sobel(3), prewitt(3), roberts(3)

Return value

 0 - ok
 1 - Bad pixeltype of input or output
 2 - Bad pixeltype of convk
 3 - Input band and output band must be of equal size
 4 - Not enough memory

Restrictions

Works on unsigned byte and signed short images. Unsigned short images will be treated as if they were signed short.

Author

Otto Milvang

Id

$Id: convolve.c,v 1.33 1997/01/09 17:16:41 svein Exp $