next up previous contents
Next: Converting cameras between precisions Up: Cameras Previous: Adding/removing camera distortion   Contents

Building the camera calibration matrix

The camera calibration matrix $K$ is triangular. Gandalf provides a routine to build $K$ from the calibration structure. The double precision version is
      Gan_Camera CameraD; /* declare camera structure */
      Gan_SquMatrix33 sm33K; /* declare camera calibration matrix K */

      /* ... build camera using e.g. gan_camera_build_linear() ... */

      /* build camera calibration matrix K */
      sm33K = gan_camera_fill_matrix_s ( &CameraD );
and the single precision version is
      Gan_Camera_f CameraF; /* declare camera structure */
      Gan_SquMatrix33_f sm33K; /* declare camera calibration matrix K */

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

      /* build camera calibration matrix K */
      sm33K = gan_cameraf_fill_matrix_s ( &CameraF );
Note that although $K$ is an upper triangular matrix, the routines above produce a lower triangular matrix, since that is the only form of fixed size triangular matrix supported by Gandalf. As explained in Section 3.1.2, Any operations involving upper triangular matrices can be implemented using implicit transpose of a lower triangular matrix.



2006-03-17