pub fn distort_points(
undistorted: &impl ToInputArray,
distorted: &mut impl ToOutputArray,
kundistorted: &impl ToInputArray,
k: &impl ToInputArray,
d: &impl ToInputArray,
alpha: f64,
) -> Result<()>Expand description
Distorts 2D points using fisheye model.
§Parameters
- undistorted: Array of object points, 1xN/Nx1 2-channel (or vector<Point2f> ), where N is the number of points in the view.
- K: Camera intrinsic matrix
.
- D: Input vector of distortion coefficients
.
- alpha: The skew coefficient.
- distorted: Output array of image points, 1xN/Nx1 2-channel, or vector<Point2f> .
Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity.
This means if you want to distort image points you have to multiply them with or
use another function overload.
§Overloaded parameters
Overload of distortPoints function to handle cases when undistorted points are obtained with non-identity camera matrix, e.g. output of #estimateNewCameraMatrixForUndistortRectify.
- undistorted: Array of object points, 1xN/Nx1 2-channel (or vector<Point2f> ), where N is the number of points in the view.
- Kundistorted: Camera intrinsic matrix used as new camera matrix for undistortion.
- K: Camera intrinsic matrix
.
- D: Input vector of distortion coefficients
.
- alpha: The skew coefficient.
- distorted: Output array of image points, 1xN/Nx1 2-channel, or vector<Point2f> .
§See also
estimateNewCameraMatrixForUndistortRectify
§C++ default parameters
- alpha: 0