MAN page from Mandrake Other XITE-3.3-3.i386.rpm
GRADIENT
Section: C Library Functions (3)
Updated: 16 Mar 1998
Index
NAME
gradient, grad, prewitt, roberts, sobel - gradientoperator for edge detection
SYNTAX
#include <
xite/convolve.h>
int gradient( IBAND input, ISS_BAND convx,
ISS_BAND convy, double xscale,
double yscale, IBAND magnitude, IBAND angle,
IBAND pseudo, int verbose );
int sobel( IBAND input, IBAND magnitude,
IBAND angle, IBAND pseudo, int verbose );
int prewitt( IBAND input, IBAND magnitude,
IBAND angle, IBAND pseudo, int verbose );
int roberts( IBAND input, IBAND magnitude,
IBAND angle, IBAND pseudo, int verbose );
int grad( IBAND input, IBAND magnitude,
IBAND angle, IBAND pseudo, int verbose );
DESCRIPTION
gradientperforms a convolution of
inputand
convx,scaled by
xscale(or 0.0 for autoscaling), giving
gx,and a convolution of
inputand
convy,scaled by
yscale((or 0.0 for autoscaling), giving
gy.gxand
gyarecombined into magnitude, angle and a pseudo image.If
verboseis TRUE some messages are witten with Info().
magnitude = |gx| + |gy|
angle = atan(gy/gx);
pseudo = combination of magnitude and angle.
sobelcalculates gx and gy as
-1 0 1 -1 -2 -1
gx = -2 0 2 gy = 0 0 0
-1 0 1 1 2 1
prewittcalculates gx and gy as
-1 0 1 -1 -1 -1
gx = -1 0 1 gy = 0 0 0
-1 0 1 1 1 1
robertscalculates gx and gy as
1 0 0 1
gx = gy =
0 -1 -1 0
gradcalculates gx and gy as
-1 1 -1 0
gx = gy =
0 0 1 0
PSEUDO
The pseudo comination of magnitude and pseudo:
mag level = magnitude / 32;
Level First Length
0 0 4
1 4 12
2 16 20
3 36 28
4 64 36
5 100 44
6 144 52
7 196 60
pseudo = first[mag_level] + angle/256* length[mag_level];
The pseudo-image may be displayed with a "gradient"color-table.
SEE ALSO
convolve(3),
conv3x3(3),
ascii2biff(3)
AUTHOR
Otto Milvang
ID
$Id: gradient_op.c,v 1.34 1997/06/11 09:44:52 svein Exp $
Index
- NAME
- SYNTAX
- DESCRIPTION
- PSEUDO
- SEE ALSO
- AUTHOR
- ID
This document was created byman2html,using the manual pages.