lvgrad(3)

LIBRARY ROUTINE
lvgrad - Sharpens an image by differentiation (gradient).

LIBRARY CALL
#include "vinclude.h"
int
lvgrad(img,procedure,pneg)
struct xvimage *img;
int  procedure, pneg;

INPUT

    1. img -- xvimage structure
    2. procedure -- type of procedure to perform
                    the gradient
                    type=1 uses horizontal and
                           vertical differences (def.)
                    type=2 Roberts gradient
                           (uses cross-differences)
    3. pneg -- invert image argument,
               if 0 photopositive (default)
               is active, if 1 photonegative
               is active

OUTPUT

    1. img -- xvimage structure, holds the
              differentiated image

    img is used for both the input xvimage structure and the output result xvimage structure. This is done to save space, but you must be careful not to overwrite important data.

MODIFICATIONS

DESCRIPTION
lvgrad differentiates an image to perform image sharpening. Two types of gradients are available:
1) uses the horizontal and vertical pixel differences (default)
2) uses the cross-differences (Roberts gradient).

Images must be of type BYTE.

The argument pneg enables the user to invert (photonegative) the resulting output image.

SEE ALSO
vgrad(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
lvgrad operates only on byte data storage type images. The gradient is determined for all pixels except for those pixels in the last row and last column.

AUTHOR
Marcelo Teran, Ramiro Jordan

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