solveP3P function
(int, VecMat, VecMat)
solveP3P(
- InputArray objectPoints,
- InputArray imagePoints,
- InputArray cameraMatrix,
- InputArray distCoeffs,
- int flags, {
- VecMat? rvecs,
- VecMat? tvecs,
Finds an object pose from 3 3D-2D point correspondences.
https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#gae5af86788e99948d40b39a03f6acf623
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);
}