[][src]Function opencv::calib3d::estimate_new_camera_matrix_for_undistort_rectify

pub fn estimate_new_camera_matrix_for_undistort_rectify(
    k: &dyn ToInputArray,
    d: &dyn ToInputArray,
    image_size: Size,
    r: &dyn ToInputArray,
    p: &mut dyn ToOutputArray,
    balance: f64,
    new_size: Size,
    fov_scale: f64
) -> Result<()>

Estimates new camera matrix for undistortion or rectification.

Parameters

  • K: Camera matrix inline formula.
  • image_size: Size of the image
  • D: Input vector of distortion coefficients inline formula.
  • R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel
  • P: New camera matrix (3x3) or new projection matrix (3x4)
  • 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].
  • new_size: the new size
  • fov_scale: Divisor for new focal length.

C++ default parameters

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