lvtilt(3)

LIBRARY ROUTINE
lvtilt - Adds a specified plane to the input image to correct for a tilt in the image luminance.

LIBRARY CALL
#include "vinclude.h"
int
lvtilt(img1,img2,mflg,xslope,yslope)
struct xvimage  *img1, *img2;
int             mflg;
float           xslope, yslope;

INPUT

img1
    (struct xvimage) - input/output image xvimage structure

img2
    (struct xvimage) - input mask image

mflg
    (int) - set to one if img2 to is to be used as a mask image

xslope & yslope
    (float) - specify the characteristics of the plane and must be given in units per pixel.

OUTPUT

img1
    (struct xvimage) - input/output image xvimage structure

lvtilt will return a value of one upon success and a zero on failure.

MODIFICATIONS
John Rasure, Marcelo Teran, Donna Koechner
Mon Jun 11 16:53:44 MDT 1990 Donna Koechner - updated to ghostwriter
Fri Jun 28 16:43:19 MDT 1991 Scott Wilson - Fixed bogous pointer increment in float loop with mask

DESCRIPTION
lvtilt adds a specified plane to the input image to correct for a tilt in the image luminance. Often an image will have a skew in the grey level values that represents a plane with a certain slope. The tilt takes the form of a plane which has a X and Y zero crossing at the center of the input image with xslope and yslope as specified in the argument line.

img1 is the input and output xvimage structure. This is done to save space, but you must be careful not to overwrite important data. img2 is the mask image, if mflg is set then the mask image is used to gate the operation. A non-zero mask pixel enables the ouput pixel to contain adjusted values. A zero mask pixel just transfers the value of the corresponding pixel in the input image to the output image. The input images must be of the same data type and size.

xslope and yslope specify the characteristics of the plane and must be given in units per pixel.

The output image data type is the same as the input data type.

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

SEE ALSO
vtilt(1), intro(3), vipl(3), verror(3), vutils(3) vgettilt(1), lvgettilt(3), vdetilt(1), vdetilt(3)

RESTRICTIONS
lvtilt will not operate on COMPLEX or BIT data storage type images.

AUTHOR
Scott Wilson, Donna Koechner

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