home *** CD-ROM | disk | FTP | other *** search
/ vis-ftp.cs.umass.edu / vis-ftp.cs.umass.edu.tar / vis-ftp.cs.umass.edu / pub / CMU / cmu_files / cal / getcal3.c < prev    next >
C/C++ Source or Header  |  1990-12-11  |  877b  |  30 lines

  1. /* getcalibration reads the given calibration files and sets up coord
  2.  * transformations for ideal to row/column and vice versa.
  3.  */
  4.  
  5. #include "test.h"
  6.  
  7. getcalibration (calfile)
  8.     char *calfile;
  9. {
  10. char filename[200];
  11. int ok;
  12. double x, y;
  13. int dummy, rcol, lcol, mcol, absrcol, abslcol, absmcol;
  14.  
  15. sprintf (filename, "%s.laix", calfile);
  16. ok = coordasciirestore (filename);
  17. ok = ok && coordstore (DISTORT(LEFT));
  18. sprintf (filename, "%s.raix", calfile);
  19. ok = ok && coordasciirestore (filename);
  20. ok = ok && coordstore (DISTORT(RIGHT));
  21. sprintf (filename, "%s.laxi", calfile);
  22. ok = ok && coordasciirestore (filename);
  23. ok = ok && coordstore (UNDISTORT(LEFT));
  24. sprintf (filename, "%s.raxi", calfile);
  25. ok = ok && coordasciirestore (filename);
  26. ok = ok && coordstore (UNDISTORT(RIGHT));
  27. if (!ok) printf ("calibration file not read in\n");
  28. else printf ("done reading calibration data\n");
  29. }
  30.