estimateNewCameraMatrixForUndistortRectify static method
Mat
estimateNewCameraMatrixForUndistortRectify(
- InputArray K,
- InputArray D,
- (int, int) imageSize,
- InputArray R, {
- OutputArray? P,
- double balance = 0.0,
- (int, int) newSize = (0, 0),
- double fovScale = 1.0,
EstimateNewCameraMatrixForUndistortRectify estimates new camera matrix for undistortion or rectification.
For further details, please see: https://docs.opencv.org/master/db/d58/group__calib3d__fisheye.html#ga384940fdf04c03e362e94b6eb9b673c9
Implementation
static Mat estimateNewCameraMatrixForUndistortRectify(
InputArray K,
InputArray D,
(int, int) imageSize,
InputArray R, {
OutputArray? P,
double balance = 0.0,
(int, int) newSize = (0, 0),
double fovScale = 1.0,
}) {
P ??= Mat.empty();
cvRun(
() => ccalib3d.cv_fisheye_estimateNewCameraMatrixForUndistortRectify(
K.ref,
D.ref,
imageSize.cvd.ref,
R.ref,
P!.ref,
balance,
newSize.cvd.ref,
fovScale,
ffi.nullptr,
),
);
return P;
}