lvabsdiff(3)

LIBRARY ROUTINE
lvabsdiff - Compute the absolute difference between two images pixel by pixel.

LIBRARY CALL
#include "vinclude.h"
int
lvabsdiff(img1,img2,img3,mflg)
struct xvimage *img1,*img2,*img3;
int  mflg;

INPUT

    1. img1 -- first xvimage strcuture
    2. img2 -- second xvimage structure
    3. img3 -- gating mask image
    4. mflg -- a flag set (equal 1) if gating image mask
               available

    The inputs must be of the same data type and size.

OUTPUT

    1. img1 -- holds the result of the absolute difference operation. The output data type is the same as the input data type.

    img1 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.

    lvabsdiff returns a 1 upon success and a 0 on failure.

MODIFICATIONS
Marcelo Teran, John Rasure, Tom Sauer

DESCRIPTION
lvabsdiff computes the absolute difference between two images pixel by pixel with a operation gating mask.

img1 and img2 are input images, img3 is the gating image, and mflg should be set to one if gating image is to be used.

img1 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.

A non-zero mask pixel in img3 enables the output pixel to contain the difference. A zero mask pixel in img3 just transfers the value of the corresponding pixel in img1 to the output pixel.

The mask image must be the same size as the input image. The output image data type is the same as the input data type.

lvabsdiff returns a value of one upon success and a zero on failure.

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

RESTRICTIONS
lvabsdiff will not operate on:
    Transform
    Complex
    Bit
data storage types.

AUTHOR
Scott Wilson

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