Table of Contents

Method EstimateNewCameraMatrixForUndistortRectify

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

EstimateNewCameraMatrixForUndistortRectify(InputArray, InputArray, Size, InputArray, OutputArray, double, Size, double)

Estimates new camera matrix for undistortion or rectification.

public static void EstimateNewCameraMatrixForUndistortRectify(InputArray k, InputArray d, Size imageSize, InputArray r, OutputArray p, double balance = 0, Size newSize = default, double fovScale = 1)

Parameters

k InputArray

Camera matrix

d InputArray

Input vector of distortion coefficients (k_1, k_2, k_3, k_4).

imageSize Size
r InputArray

Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel

p OutputArray

New camera matrix (3x3) or new projection matrix (3x4)

balance double

Sets the new focal length in range between the min focal length and the max focal length.Balance is in range of[0, 1].

newSize Size
fovScale double

Divisor for new focal length.