Method SolvePnPGeneric
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
SolvePnPGeneric(InputArray, InputArray, InputArray, InputArray, out Mat[], out Mat[], bool, SolvePnPMethod, InputArray, InputArray, OutputArray)
Finds all pose solutions supported by the selected PnP solver.
public static int SolvePnPGeneric(InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, out Mat[] rvecs, out Mat[] tvecs, bool useExtrinsicGuess = false, SolvePnPMethod flags = SolvePnPMethod.Iterative, InputArray rvec = default, InputArray tvec = default, OutputArray reprojectionError = default)
Parameters
objectPointsInputArrayObject points.
imagePointsInputArrayCorresponding image points.
cameraMatrixInputArrayCamera intrinsic matrix.
distCoeffsInputArrayDistortion coefficients, or an empty input for zero distortion.
rvecsMat[]Output rotation vectors.
tvecsMat[]Output translation vectors.
useExtrinsicGuessboolUse the supplied rotation and translation as an initial estimate.
flagsSolvePnPMethodPnP solver.
rvecInputArrayOptional initial rotation vector.
tvecInputArrayOptional initial translation vector.
reprojectionErrorOutputArrayOptional per-solution reprojection errors.
Returns
- int
Number of solutions.