solveP3P function

(int, VecMat, VecMat) solveP3P(
  1. InputArray objectPoints,
  2. InputArray imagePoints,
  3. InputArray cameraMatrix,
  4. InputArray distCoeffs,
  5. int flags, {
  6. VecMat? rvecs,
  7. VecMat? tvecs,
})

Implementation

(int rval, VecMat rvecs, VecMat tvecs) solveP3P(
  InputArray objectPoints,
  InputArray imagePoints,
  InputArray cameraMatrix,
  InputArray distCoeffs,
  int flags, {
  VecMat? rvecs,
  VecMat? tvecs,
}) {
  rvecs ??= VecMat();
  tvecs ??= VecMat();
  final prval = calloc<ffi.Int>();
  cvRun(
    () => ccalib3d.cv_solveP3P(
      objectPoints.ref,
      imagePoints.ref,
      cameraMatrix.ref,
      distCoeffs.ref,
      rvecs!.ptr,
      tvecs!.ptr,
      flags,
      prval,
      ffi.nullptr,
    ),
  );
  final rval = prval.value;
  calloc.free(prval);
  return (rval, rvecs, tvecs);
}