decomposeProjectionMatrixAsync function

Future<(Mat, Mat, Mat)> decomposeProjectionMatrixAsync(
  1. Mat projMatrix, {
  2. OutputArray? cameraMatrix,
  3. OutputArray? rotMatrix,
  4. OutputArray? transVect,
  5. OutputArray? rotMatrixX,
  6. OutputArray? rotMatrixY,
  7. OutputArray? rotMatrixZ,
  8. OutputArray? eulerAngles,
})

Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix.

void cv::decomposeProjectionMatrix (InputArray projMatrix, OutputArray cameraMatrix, OutputArray rotMatrix, OutputArray transVect, OutputArray rotMatrixX=noArray(), OutputArray rotMatrixY=noArray(), OutputArray rotMatrixZ=noArray(), OutputArray eulerAngles=noArray())

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

Implementation

Future<(Mat cameraMatrix, Mat rotMatrix, Mat transVect)> decomposeProjectionMatrixAsync(
  Mat projMatrix, {
  OutputArray? cameraMatrix,
  OutputArray? rotMatrix,
  OutputArray? transVect,
  OutputArray? rotMatrixX,
  OutputArray? rotMatrixY,
  OutputArray? rotMatrixZ,
  OutputArray? eulerAngles,
}) async {
  cameraMatrix ??= Mat.empty();
  rotMatrix ??= Mat.empty();
  transVect ??= Mat.empty();
  rotMatrixX ??= Mat.empty();
  rotMatrixY ??= Mat.empty();
  rotMatrixZ ??= Mat.empty();
  eulerAngles ??= Mat.empty();
  return cvRunAsync0(
    (callback) => ccalib3d.cv_decomposeProjectionMatrix(
      projMatrix.ref,
      cameraMatrix!.ref,
      rotMatrix!.ref,
      transVect!.ref,
      rotMatrixX!.ref,
      rotMatrixY!.ref,
      rotMatrixZ!.ref,
      eulerAngles!.ref,
      callback,
    ),
    (c) {
      return c.complete((cameraMatrix!, rotMatrix!, transVect!));
    },
  );
}