getDefaultNewCameraMatrixAsync function

Future<Mat> getDefaultNewCameraMatrixAsync(
  1. InputArray cameraMatrix, {
  2. Size? imgsize,
  3. bool centerPrincipalPoint = false,
})

Returns the default new camera matrix.

The function returns the camera matrix that is either an exact copy of the input cameraMatrix (when centerPrinicipalPoint=false ), or the modified one (when centerPrincipalPoint=true).

https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#ga744529385e88ef7bc841cbe04b35bfbf

Implementation

Future<Mat> getDefaultNewCameraMatrixAsync(
  InputArray cameraMatrix, {
  Size? imgsize,
  bool centerPrincipalPoint = false,
}) async {
  final prval = calloc<cvg.Mat>();
  imgsize ??= Size(0, 0);
  return cvRunAsync0(
    (callback) => ccalib3d.cv_getDefaultNewCameraMatrix(
      cameraMatrix.ref,
      imgsize!.ref,
      centerPrincipalPoint,
      prval,
      callback,
    ),
    (c) => c.complete(Mat.fromPointer(prval)),
  );
}