lvdiff(3)

LIBRARY ROUTINE
lvdiff - Performs image differentiation by running 2 NxN weighted operators on an image.

LIBRARY CALL
#include "vinclude.h"
int
lvdiff(img,kern1,kern2)
struct xvimage *img, *kern1, *kern2;

INPUT

    1. img -- xvimage structure
    2. kern1 -- kernel or operator in X
    3. kern2 -- kernel or operator in Y

OUTPUT

    1. img -- xvimage structure, holds the
              resulting 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.

    lvdiff returns 1 upon success and 0 on failure.

MODIFICATIONS

DESCRIPTION
lvdiff performs image differentiation by running two NxN weighted operators (masks) on an image. It can be used to implement a Sobel filter if the correct kernels are provided.

Images must be of type BYTE. Both kernels must have the same dimensions. Kernels may be either type INTEGER or FLOAT.

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

RESTRICTIONS
The input image must be of type BYTE and the kernels must be of type INTEGER or FLOAT.

AUTHOR
Marcelo Teran, Ramiro Jordan

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