| Cv2Undistort Method |
corrects lens distortion for the given camera matrix and distortion coefficients
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void Undistort(
InputArray src,
OutputArray dst,
InputArray cameraMatrix,
InputArray distCoeffs,
InputArray newCameraMatrix = null
)
Public Shared Sub Undistort (
src As InputArray,
dst As OutputArray,
cameraMatrix As InputArray,
distCoeffs As InputArray,
Optional newCameraMatrix As InputArray = Nothing
)
public:
static void Undistort(
InputArray^ src,
OutputArray^ dst,
InputArray^ cameraMatrix,
InputArray^ distCoeffs,
InputArray^ newCameraMatrix = nullptr
)
static member Undistort :
src : InputArray *
dst : OutputArray *
cameraMatrix : InputArray *
distCoeffs : InputArray *
?newCameraMatrix : InputArray
(* Defaults:
let _newCameraMatrix = defaultArg newCameraMatrix null
*)
-> unit
Parameters
- src
- Type: OpenCvSharpInputArray
Input (distorted) image. - dst
- Type: OpenCvSharpOutputArray
Output (corrected) image that has the same size and type as src . - cameraMatrix
- Type: OpenCvSharpInputArray
Input camera matrix - distCoeffs
- Type: OpenCvSharpInputArray
Input vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5,
or 8 elements. If the vector is null, the zero distortion coefficients are assumed. - newCameraMatrix (Optional)
- Type: OpenCvSharpInputArray
Camera matrix of the distorted image.
By default, it is the same as cameraMatrix but you may additionally scale
and shift the result by using a different matrix.
See Also