lvgettilt(3)

LIBRARY ROUTINE
lvgettilt - computes the best-fit plane parameters for the input VIFF file

LIBRARY CALL
#include "vinclude.h"
lvgettilt(image, mimage, mflg, a, b, c)
struct xvimage  *image, *mimage;
int             mflg;
double          *a,*b,*c;

INPUT
lvgettilt:

image
    (struct xvimage) - input xvimage structure

mimage
    (struct xvimage) - input mask xvimage structure

mflg
    (int) - flag set to 1 if masking image is specified

    lvfindtilt:

image
    (struct xvimage) - input xvimage structure

    lvmafdtilt:

image
    (struct xvimage) - input xvimage structure

mimage
    (struct xvimage) - input mask xvimage structure

OUTPUT
lvgettilt, lvfindtilt, & lvmafdtilt:

a   (double) - A coefficient of f(x,y)=Ax+By+C

b   (double) - B coefficient of f(x,y)=Ax+By+C

c   (double) - C coefficient of f(x,y)=Ax+By+C

These library functions will return a zero if failure and a one upon success.

MODIFICATIONS

Mon Jun 11 16:30:29 MDT 1990 Donna Koechner - updated to ghostwriter

Wed Mar 20 12:36:43 MET 1991 Jean Pierre Guerin

    1- fixed loops to work right with non square images

    2- fixed bogus (int) caste

    3- fixed incorrect term in calculation of detc

    4- corrected pointer increments

25-Sep-91 Scott Wilson - Changed (int) castes to (unsigned int) castes in byte processing loop - otherwise can get goofy sign extension problems.

25-Sep-91 Scott Wilson - Found that the det{A,B,C} eqns were ALL wrong. Fixed them up after rederiving the whole mess.

26-Sep-91 Scott Wilson - Fixed incorrect center point calculation.

DESCRIPTION
lvgettilt & lvfindtilt

compute the least-squares best fit plane for an image. The plane will be given by f(x,y)=Ax+By+C with the tilt coefficients in inverse pixels.

lvmafdtilt computes the least-squares best fit plane for an image with a mask. The plane will be given by f(x,y)=Ax+By+C with the tilt coefficients in inverse pixels. The plane coefficients will be computed only for those pixels enabled by the mask image. If a mask image is supplied, it MUST be of the same type and size as the input image.

SEE ALSO
vgettilt(1), intro(3), vipl(3), verror(3), vutils(3) lvtilt(3), lvdetilt(3)

RESTRICTIONS
If a mask image is supplied, it MUST be of the same type and size as the input image.

The lvfindtilt and lvmafdtilt libraries will not work on BIT or COMPLEX data storage type files. lvfindtilt and lvmafdtilt will only calculate the tilt of the first band in a multiband image.

AUTHOR
Scott Wilson, Donna Koechner

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