[][src]Function opencv::calib3d::fisheye_stereo_rectify

pub fn fisheye_stereo_rectify(
    k1: &dyn ToInputArray,
    d1: &dyn ToInputArray,
    k2: &dyn ToInputArray,
    d2: &dyn ToInputArray,
    image_size: Size,
    r: &dyn ToInputArray,
    tvec: &dyn ToInputArray,
    r1: &mut dyn ToOutputArray,
    r2: &mut dyn ToOutputArray,
    p1: &mut dyn ToOutputArray,
    p2: &mut dyn ToOutputArray,
    q: &mut dyn ToOutputArray,
    flags: i32,
    new_image_size: Size,
    balance: f64,
    fov_scale: f64
) -> Result<()>

Stereo rectification for fisheye camera model

Parameters

  • K1: First camera matrix.
  • D1: First camera distortion parameters.
  • K2: Second camera matrix.
  • D2: Second camera distortion parameters.
  • imageSize: Size of the image used for stereo calibration.
  • R: Rotation matrix between the coordinate systems of the first and the second cameras.
  • tvec: Translation vector between coordinate systems of the cameras.
  • R1: Output 3x3 rectification transform (rotation matrix) for the first camera.
  • R2: Output 3x3 rectification transform (rotation matrix) for the second camera.
  • P1: Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera.
  • P2: Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera.
  • Q: Output inline formula disparity-to-depth mapping matrix (see reprojectImageTo3D ).
  • flags: Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set, the function makes the principal points of each camera have the same pixel coordinates in the rectified views. And if the flag is not set, the function may still shift the images in the horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the useful image area.
  • newImageSize: New image resolution after rectification. The same size should be passed to initUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0) is passed (default), it is set to the original imageSize . Setting it to larger value can help you preserve details in the original image, especially when there is a big radial distortion.
  • balance: Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1].
  • fov_scale: Divisor for new focal length.

C++ default parameters

  • new_image_size: Size()
  • balance: 0.0
  • fov_scale: 1.0