~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/file/camera/distort_r.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2   */
  3 #include <stdio.h>
  4 #include <tina/sys.h>
  5 #include <tina/sysfuncs.h>
  6 #include <tina/math.h>
  7 #include <tina/mathfuncs.h>
  8 #include <tina/vision.h>
  9 
 10 void    rdist_read_fp(Camera * cam, FILE * fp)
 11 {
 12     void   *cam_distort_copy();
 13     Vec2    radial_distort();
 14     Vec2    radial_correct();
 15     int     n, i;
 16     double *a;
 17     char    ch[256];
 18 
 19     if (freadline(fp, ch) != EOF)
 20     {
 21         (void) sscanf(ch, "%d", &n);
 22         a = (double *) ralloc((unsigned) (sizeof(double) * (n + 1)));
 23         a[0] = n;
 24         for (i = 0; i < n; i++)
 25             (void) fscanf(fp, "%lf", &(a[i + 1]));
 26         cam->distort_func = radial_distort;
 27         cam->correct_func = radial_correct;
 28         cam->distort_params = a;
 29         cam->copy_dist_func = cam_distort_copy;
 30     } else
 31     {
 32         cam->distort_params = NULL;
 33         cam->distort_func = NULL;
 34         cam->correct_func = NULL;
 35         cam->copy_dist_func = NULL;
 36     }
 37 }
 38 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.