


lvgettilt(3)           C LIBRARY FUNCTIONS           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  struc-
                    ture

     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  struc-
                    ture

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



Sun Release 4.1       Last change: 09/26/9                      1






lvgettilt(3)           C LIBRARY FUNCTIONS           lvgettilt(3)



     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 calcu-
     lation.

DESCRIPTION
     _l_v_g_e_t_t_i_l_t & _l_v_f_i_n_d_t_i_l_t 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  pix-
     els.

     _l_v_m_a_f_d_t_i_l_t 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  pix-
     els.  The plane coefficients will be computed only for those
     pixels enabled by the mask image.  If a mask image  is  sup-
     plied,  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






Sun Release 4.1       Last change: 09/26/9                      2






lvgettilt(3)           C LIBRARY FUNCTIONS           lvgettilt(3)



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




















































Sun Release 4.1       Last change: 09/26/9                      3



