CvInvokeSolvePnPRansac Method |
http://www.emgu.com
Finds an object pose from 3D-2D point correspondences using the RANSAC scheme.
Namespace:
Emgu.CV
Assembly:
Emgu.CV.World (in Emgu.CV.World.dll) Version: 4.1.1.3497 (4.1.1.3497)
Syntaxpublic static bool SolvePnPRansac(
IInputArray objectPoints,
IInputArray imagePoints,
IInputArray cameraMatrix,
IInputArray distCoeffs,
IOutputArray rvec,
IOutputArray tvec,
bool useExtrinsicGuess = false,
int iterationsCount = 100,
float reprojectionError = 8f,
double confident = 0.99,
IOutputArray inliers = null,
SolvePnpMethod flags = SolvePnpMethod.Iterative
)
Public Shared Function SolvePnPRansac (
objectPoints As IInputArray,
imagePoints As IInputArray,
cameraMatrix As IInputArray,
distCoeffs As IInputArray,
rvec As IOutputArray,
tvec As IOutputArray,
Optional useExtrinsicGuess As Boolean = false,
Optional iterationsCount As Integer = 100,
Optional reprojectionError As Single = 8F,
Optional confident As Double = 0.99,
Optional inliers As IOutputArray = Nothing,
Optional flags As SolvePnpMethod = SolvePnpMethod.Iterative
) As Boolean
public:
static bool SolvePnPRansac(
IInputArray^ objectPoints,
IInputArray^ imagePoints,
IInputArray^ cameraMatrix,
IInputArray^ distCoeffs,
IOutputArray^ rvec,
IOutputArray^ tvec,
bool useExtrinsicGuess = false,
int iterationsCount = 100,
float reprojectionError = 8f,
double confident = 0.99,
IOutputArray^ inliers = nullptr,
SolvePnpMethod flags = SolvePnpMethod::Iterative
)
static member SolvePnPRansac :
objectPoints : IInputArray *
imagePoints : IInputArray *
cameraMatrix : IInputArray *
distCoeffs : IInputArray *
rvec : IOutputArray *
tvec : IOutputArray *
?useExtrinsicGuess : bool *
?iterationsCount : int *
?reprojectionError : float32 *
?confident : float *
?inliers : IOutputArray *
?flags : SolvePnpMethod
(* Defaults:
let _useExtrinsicGuess = defaultArg useExtrinsicGuess false
let _iterationsCount = defaultArg iterationsCount 100
let _reprojectionError = defaultArg reprojectionError 8f
let _confident = defaultArg confident 0.99
let _inliers = defaultArg inliers null
let _flags = defaultArg flags SolvePnpMethod.Iterative
*)
-> bool
Parameters
- objectPoints
- Type: Emgu.CVIInputArray
Array of object points in the object coordinate space, 3xN/Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. VectorOfPoint3D32f can be also passed here. - imagePoints
- Type: Emgu.CVIInputArray
Array of corresponding image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. VectorOfPointF can be also passed here. - cameraMatrix
- Type: Emgu.CVIInputArray
Input camera matrix - distCoeffs
- Type: Emgu.CVIInputArray
Input vector of distortion coefficients of 4, 5, 8 or 12 elements. If the vector is null/empty, the zero distortion coefficients are assumed. - rvec
- Type: Emgu.CVIOutputArray
Output rotation vector - tvec
- Type: Emgu.CVIOutputArray
Output translation vector. - useExtrinsicGuess (Optional)
- Type: SystemBoolean
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. - iterationsCount (Optional)
- Type: SystemInt32
Number of iterations. - reprojectionError (Optional)
- Type: SystemSingle
Inlier threshold value used by the RANSAC procedure. The parameter value is the maximum allowed distance between the observed and computed point projections to consider it an inlier. - confident (Optional)
- Type: SystemDouble
The probability that the algorithm produces a useful result. - inliers (Optional)
- Type: Emgu.CVIOutputArray
Output vector that contains indices of inliers in objectPoints and imagePoints . - flags (Optional)
- Type: Emgu.CV.CvEnumSolvePnpMethod
Method for solving a PnP problem
Return Value
Type:
BooleanTrue if successful
See Also