CvInvokeSolvePnPGeneric Method |
http://www.emgu.com
Finds an object pose from 3D-2D point correspondences.
Namespace:
Emgu.CV
Assembly:
Emgu.CV.World (in Emgu.CV.World.dll) Version: 4.1.1.3497 (4.1.1.3497)
Syntaxpublic static int SolvePnPGeneric(
IInputArray objectPoints,
IInputArray imagePoints,
IInputArray cameraMatrix,
IInputArray distCoeffs,
IOutputArrayOfArrays rvecs,
IOutputArrayOfArrays tvecs,
bool useExtrinsicGuess = false,
SolvePnpMethod flags = SolvePnpMethod.Iterative,
IInputArray rvec = null,
IInputArray tvec = null,
IOutputArray reprojectionError = null
)
Public Shared Function SolvePnPGeneric (
objectPoints As IInputArray,
imagePoints As IInputArray,
cameraMatrix As IInputArray,
distCoeffs As IInputArray,
rvecs As IOutputArrayOfArrays,
tvecs As IOutputArrayOfArrays,
Optional useExtrinsicGuess As Boolean = false,
Optional flags As SolvePnpMethod = SolvePnpMethod.Iterative,
Optional rvec As IInputArray = Nothing,
Optional tvec As IInputArray = Nothing,
Optional reprojectionError As IOutputArray = Nothing
) As Integer
public:
static int SolvePnPGeneric(
IInputArray^ objectPoints,
IInputArray^ imagePoints,
IInputArray^ cameraMatrix,
IInputArray^ distCoeffs,
IOutputArrayOfArrays^ rvecs,
IOutputArrayOfArrays^ tvecs,
bool useExtrinsicGuess = false,
SolvePnpMethod flags = SolvePnpMethod::Iterative,
IInputArray^ rvec = nullptr,
IInputArray^ tvec = nullptr,
IOutputArray^ reprojectionError = nullptr
)
static member SolvePnPGeneric :
objectPoints : IInputArray *
imagePoints : IInputArray *
cameraMatrix : IInputArray *
distCoeffs : IInputArray *
rvecs : IOutputArrayOfArrays *
tvecs : IOutputArrayOfArrays *
?useExtrinsicGuess : bool *
?flags : SolvePnpMethod *
?rvec : IInputArray *
?tvec : IInputArray *
?reprojectionError : IOutputArray
(* Defaults:
let _useExtrinsicGuess = defaultArg useExtrinsicGuess false
let _flags = defaultArg flags SolvePnpMethod.Iterative
let _rvec = defaultArg rvec null
let _tvec = defaultArg tvec null
let _reprojectionError = defaultArg reprojectionError null
*)
-> int
Parameters
- objectPoints
- Type: Emgu.CVIInputArray
Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. VectorOfPoint3f can also be passed here. - imagePoints
- Type: Emgu.CVIInputArray
Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. VectorOfPoint2f can also be passed here. - cameraMatrix
- Type: Emgu.CVIInputArray
Input camera matrix A=[[fx,0,0],[0,fy,0][cx,cy,1]]. - distCoeffs
- Type: Emgu.CVIInputArray
Input vector of distortion coefficients (k1,k2,p1,p2[,k3[,k4,k5,k6[,s1,s2,s3,s4[,τx,τy]]]]) of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. - rvecs
- Type: Emgu.CVIOutputArrayOfArrays
Vector of output rotation vectors (see Rodrigues ) that, together with tvecs, brings points from the model coordinate system to the camera coordinate system. - tvecs
- Type: Emgu.CVIOutputArrayOfArrays
Vector of output translation vectors. - useExtrinsicGuess (Optional)
- Type: SystemBoolean
Parameter used for SOLVEPNP_ITERATIVE. If true, the function uses the provided rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further optimizes them. - flags (Optional)
- Type: Emgu.CV.CvEnumSolvePnpMethod
Method for solving a PnP problem - rvec (Optional)
- Type: Emgu.CVIInputArray
Rotation vector used to initialize an iterative PnP refinement algorithm, when flag is SOLVEPNP_ITERATIVE and useExtrinsicGuess is set to true. - tvec (Optional)
- Type: Emgu.CVIInputArray
Translation vector used to initialize an iterative PnP refinement algorithm, when flag is SOLVEPNP_ITERATIVE and useExtrinsicGuess is set to true. - reprojectionError (Optional)
- Type: Emgu.CVIOutputArray
Optional vector of reprojection error, that is the RMS error between the input image points and the 3D object points projected with the estimated pose.
Return Value
Type:
Int32[Missing <returns> documentation for "M:Emgu.CV.CvInvoke.SolvePnPGeneric(Emgu.CV.IInputArray,Emgu.CV.IInputArray,Emgu.CV.IInputArray,Emgu.CV.IInputArray,Emgu.CV.IOutputArrayOfArrays,Emgu.CV.IOutputArrayOfArrays,System.Boolean,Emgu.CV.CvEnum.SolvePnpMethod,Emgu.CV.IInputArray,Emgu.CV.IInputArray,Emgu.CV.IOutputArray)"]
See Also