next up previous contents
Next: Computing the fundamental/essential matrix Up: Cameras Previous: Building the camera calibration   Contents

Converting cameras between precisions

It is sometimes necessary to convert from a double precision Gan_Camera to a single precision Gan_Camera_f or vice versa. Gandalf provides two versions of these routines:
      Gan_Camera   CameraD; /* double precision camera */
      Gan_Camera_f CameraF; /* single precision camera */

      /* ... build CameraD using e.g. gan_cameraf_build_linear() ... */

      /* convert camera from double precision to single precision */
      gan_cameraf_from_camera_q ( &CameraD, &CameraF ); /* OR */
      CameraF = gan_cameraf_from_camera_s ( &CameraD );

      /* convert camera back from single precision to double precision */
      gan_camera_from_cameraf_q ( &CameraF, &CameraD ); /* OR */
      CameraD = gan_camera_from_cameraf_s ( &CameraF );



2006-03-17