http://www.emgu.com
Finds an object pose from 3 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 SolveP3P(
IInputArray objectPoints,
IInputArray imagePoints,
IInputArray cameraMatrix,
IInputArray distCoeffs,
IOutputArrayOfArrays rvecs,
IOutputArrayOfArrays tvecs,
SolvePnpMethod flags
)
Public Shared Function SolveP3P (
objectPoints As IInputArray,
imagePoints As IInputArray,
cameraMatrix As IInputArray,
distCoeffs As IInputArray,
rvecs As IOutputArrayOfArrays,
tvecs As IOutputArrayOfArrays,
flags As SolvePnpMethod
) As Integer
public:
static int SolveP3P(
IInputArray^ objectPoints,
IInputArray^ imagePoints,
IInputArray^ cameraMatrix,
IInputArray^ distCoeffs,
IOutputArrayOfArrays^ rvecs,
IOutputArrayOfArrays^ tvecs,
SolvePnpMethod flags
)
static member SolveP3P :
objectPoints : IInputArray *
imagePoints : IInputArray *
cameraMatrix : IInputArray *
distCoeffs : IInputArray *
rvecs : IOutputArrayOfArrays *
tvecs : IOutputArrayOfArrays *
flags : SolvePnpMethod -> int
Parameters
- objectPoints
- Type: Emgu.CVIInputArray
Array of object points in the object coordinate space, 3x3 1-channel or 1x3/3x1 3-channel. VectorOfPoint3f can be also passed here. - imagePoints
- Type: Emgu.CVIInputArray
Array of corresponding image points, 3x2 1-channel or 1x3/3x1 2-channel. VectorOfPoint2f can be also 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
Output rotation vectors (see Rodrigues ) that, together with tvecs , brings points from the model coordinate system to the camera coordinate system. A P3P problem has up to 4 solutions. - tvecs
- Type: Emgu.CVIOutputArrayOfArrays
Output translation vectors. - flags
- Type: Emgu.CV.CvEnumSolvePnpMethod
Method for solving a P3P problem: either P3P or AP3P
Return Value
Type:
Int32Number of solutions
See Also