Rectification

Rectification: 
    Generally, for a given pixel on one image, its match, that is the projection onto the other image of the same 3D point, can be anywhere in the other image. The rectification is a way to transform the two images so that, in the rectified images, corresponding pixels lie on the same row.

    After rectification, one-dimensionnal matching methods, faster than two-dimensionnal methods, can be used.

    Rectification can be performed from parameters provided by a "strong" calibration or the fundamental matrix provided by a weak calibration.

    We have chosen the latter method. The algorithm used is from Emeric Malevergne and has been adapted to the images to process.

    The algorithm computes the rectification matrices transforming the original images into rectified images, from the fundamental matrix provided by a weak calibration.

    The main steps of the algorithm are:

    • the computation of characteristic points from the fundamental matrix including
      • epipoles (projections of the optical centers of each camera onto the other image)
      • common epipolar strip
    • the computation of projection matrices verifying several criteria
      • the epipolar strip must fill the whole height of the rectified image frame
      • the projection of the middle line of this strip must be the middle row of the rectified images
      • the common part of the two images must fill as much as possible the rectified image frame
    The following figures show original images. A few epipolar lines have been indicated. They are not horizontal.
     

    The following figures show rectified images. Epipolar lines are horizontal and the match of each row is the same raw on the other image.

     
     

    Below, an other example of a stereo pair and the rectified images. The figures represent the mine field built for the project at the Royal Military Academy.