next up previous contents
Next: Camera Functions Up: Describing Cameras Previous: Describing Cameras   Contents

Parallel Stereo Camera Geometry

It is helpful to represent arbitrary stereo camera geometries in terms of their relationship to an equivalent parallel camera stereo geometry. In such a geometry the "epipolar" matching constraint becomes a same raster constraint and the projection of disparity coordinates to world coordinates is much simplified. This arrangement is represented in Tina using the parcam structure

typedef struct parcam
  {
      Ts_id   ts_id;            /* Tina structure identifier */
      /** camera info **/
      unsigned int type;
      unsigned int label;

      float   f;                /* notional focal length */
      float   I;                /* interocular separation */
      float   pixel;            /* notional pixel size */

      /* cameras and rectified counter parts */
      struct camera *cam1;      /* original camera 1 */
      struct camera *rcam1;     /* rectified camera 1 */
      struct camera *cam2;      /* original camera 2 */
      struct camera *rcam2;     /* rectified camera 2 */

      struct mat3 rect1;        /* rectification matrix for camera 1 */
      struct mat3 derect1;      /* derectification matrix for camera 1 */

      struct mat3 rect2;        /* rectification matrix for camera 2 */
      struct mat3 derect2;      /* derectification matrix for camera 2 */

      struct mat3 e;            /* epipolar colineation matrix */
  } Parcam;

Here focal length f has a notional value which may or may not be derived from that of either physical camera. In the case of edge based stereo processing in Tina, it is convenient for the representation of edge data transformed into the parallel image representation to choose f to be the the same as the focal length of the camera cam1. Similarly pixel is the pixel size used to represent image related data in the parallel camera image frames.

I is the magnitude of the interocular separation between the optical centers of the two cameras (either physical or parallel). It is assumed that the two cameras from which the parallel camera geometry is derived, cam1 and cam2, have non NULL transf fields that are defined with respect to the same world coordinate frame.

rcam1 and rcam2, if not NULL, are camera structures that represent a parallel camera geometry equivalent to the general camera geometry defined by cam1 and cam2. The transf of all cameras are defined with respect to the same world coordinate frame.

Projective transforms to and from each camera and respective parallel cameras are represented by rect1, derect1, rect2, and derect2. rect, short for the process of rectification, map image coordinates in non parallel cameras to parallel cameras, and derect the converse. Again considerable flexibility exist here and the exact definition of which coordinates the rectification is between is left to the requirements of the system using the parcam structure.

Finally the Mat3 field e is included to represent the epipolar constraint matrix. This is useful for situations in which the relationship between the cameras are not derived from the physical transformation (known or obtained from prior calibration) but are computed from the image data itself.


next up previous contents
Next: Camera Functions Up: Describing Cameras Previous: Describing Cameras   Contents
root 2017-09-21