Class RectifyCalibrated

java.lang.Object
boofcv.alg.geo.rectify.RectifyCalibrated

public class RectifyCalibrated
extends Object

Rectifies a stereo pair with known camera calibration using a simple algorithm described in [1] such that the epipoles project to infinity along the x-axis. After rectification both images will have the same intrinsic calibration matrix, same extrinsic rotation matrix, but the optical centers are not modified.

The calibration matrix is the standard upper triangular matrix used throughout the library. A single calibration matrix is computed for both images by averaging the two original and setting the skew to zero.

The rectified view is chosen such that it will be most similar to the first camera. This is done by making the original z-axis and the rectified z-axis similar.

[1] A. Fusiello, E. Trucco, and A. Verri, "A Compact Algorithm for Rectification of Stereo Pairs" Machine Vision and Applications, 2000

  • Constructor Details

    • RectifyCalibrated

      public RectifyCalibrated()
  • Method Details

    • process

      public void process​(DMatrixRMaj K1, Se3_F64 worldToCamera1, DMatrixRMaj K2, Se3_F64 worldToCamera2)
      Computes rectification transforms for both cameras and optionally a single calibration matrix.
      Parameters:
      K1 - Calibration matrix for first camera.
      worldToCamera1 - Location of the first camera.
      K2 - Calibration matrix for second camera.
      worldToCamera2 - Location of the second camera.
    • getCalibrationMatrix

      public DMatrixRMaj getCalibrationMatrix()
      If a single calibration matrix was requested then this returns it.
      Returns:
      Calibration matrix for both cameras