[][src]Function opencv::calib3d::fisheye_stereo_calibrate

pub fn fisheye_stereo_calibrate(
    object_points: &dyn ToInputArray,
    image_points1: &dyn ToInputArray,
    image_points2: &dyn ToInputArray,
    k1: &mut dyn ToInputOutputArray,
    d1: &mut dyn ToInputOutputArray,
    k2: &mut dyn ToInputOutputArray,
    d2: &mut dyn ToInputOutputArray,
    image_size: Size,
    r: &mut dyn ToOutputArray,
    t: &mut dyn ToOutputArray,
    flags: i32,
    criteria: &TermCriteria
) -> Result<f64>

Performs stereo calibration

Parameters

  • objectPoints: Vector of vectors of the calibration pattern points.
  • imagePoints1: Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
  • imagePoints2: Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
  • K1: Input/output first camera matrix: inline formula , inline formula . If any of fisheye::CALIB_USE_INTRINSIC_GUESS , fisheye::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
  • D1: Input/output vector of distortion coefficients inline formula of 4 elements.
  • K2: Input/output second camera matrix. The parameter is similar to K1 .
  • D2: Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
  • imageSize: Size of the image used only to initialize intrinsic camera matrix.
  • R: Output rotation matrix between the 1st and the 2nd camera coordinate systems.
  • T: Output translation vector between the coordinate systems of the cameras.
  • flags: Different flags that may be zero or a combination of the following values:
  • fisheye::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • fisheye::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • fisheye::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • fisheye::CALIB_CHECK_COND The functions will check validity of condition number.
  • fisheye::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • fisheye::CALIB_FIX_K1..4 Selected distortion coefficients are set to zeros and stay zero.
  • criteria: Termination criteria for the iterative optimization algorithm.

C++ default parameters

  • flags: fisheye::CALIB_FIX_INTRINSIC
  • criteria: TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON)