Classes | Functions
cv3 Namespace Reference

Classes

class  Affine3DEstimatorCallback
class  LMeDSPointSetRegistrator
class  LMSolver
class  PnPRansacCallback
class  PointSetRegistrator
class  RANSACPointSetRegistrator

Functions

template<typename T >
int compressElems (T *ptr, const uchar *mask, int mstep, int count)
cv::Ptr< PointSetRegistratorcreateLMeDSPointSetRegistrator (const cv::Ptr< PointSetRegistrator::Callback > &cb, int modelPoints, double confidence=0.99, int maxIters=1000)
Ptr< PointSetRegistratorcreateLMeDSPointSetRegistrator (const Ptr< PointSetRegistrator::Callback > &_cb, int _modelPoints, double _confidence, int _maxIters)
cv::Ptr< LMSolvercreateLMSolver (const cv::Ptr< LMSolver::Callback > &cb, int maxIters)
cv::Ptr< PointSetRegistratorcreateRANSACPointSetRegistrator (const cv::Ptr< PointSetRegistrator::Callback > &cb, int modelPoints, double threshold, double confidence=0.99, int maxIters=1000)
Ptr< PointSetRegistratorcreateRANSACPointSetRegistrator (const Ptr< PointSetRegistrator::Callback > &_cb, int _modelPoints, double _threshold, double _confidence, int _maxIters)
int RANSACUpdateNumIters (double p, double ep, int modelPoints, int maxIters)
bool solvePnPRansac (cv::InputArray objectPoints, cv::InputArray imagePoints, cv::InputArray cameraMatrix, cv::InputArray distCoeffs, cv::OutputArray rvec, cv::OutputArray tvec, bool useExtrinsicGuess=false, int iterationsCount=100, float reprojectionError=8.0, double confidence=0.99, cv::OutputArray inliers=cv::noArray(), int flags=CV_ITERATIVE)
 Finds an object pose from 3D-2D point correspondences using the RANSAC scheme.
bool solvePnPRansac (InputArray _opoints, InputArray _ipoints, InputArray _cameraMatrix, InputArray _distCoeffs, OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, OutputArray _inliers, int flags)

Function Documentation

template<typename T >
int cv3::compressElems ( T ptr,
const uchar *  mask,
int  mstep,
int  count 
) [inline]

Definition at line 141 of file solvepnp.h.

cv::Ptr<PointSetRegistrator> cv3::createLMeDSPointSetRegistrator ( const cv::Ptr< PointSetRegistrator::Callback > &  cb,
int  modelPoints,
double  confidence = 0.99,
int  maxIters = 1000 
)
Ptr<PointSetRegistrator> cv3::createLMeDSPointSetRegistrator ( const Ptr< PointSetRegistrator::Callback > &  _cb,
int  _modelPoints,
double  _confidence,
int  _maxIters 
)

Definition at line 555 of file solvepnp.cpp.

cv::Ptr<LMSolver> cv3::createLMSolver ( const cv::Ptr< LMSolver::Callback > &  cb,
int  maxIters 
)
cv::Ptr<PointSetRegistrator> cv3::createRANSACPointSetRegistrator ( const cv::Ptr< PointSetRegistrator::Callback > &  cb,
int  modelPoints,
double  threshold,
double  confidence = 0.99,
int  maxIters = 1000 
)
Ptr<PointSetRegistrator> cv3::createRANSACPointSetRegistrator ( const Ptr< PointSetRegistrator::Callback > &  _cb,
int  _modelPoints,
double  _threshold,
double  _confidence,
int  _maxIters 
)

Definition at line 546 of file solvepnp.cpp.

int cv3::RANSACUpdateNumIters ( double  p,
double  ep,
int  modelPoints,
int  maxIters 
)

Definition at line 216 of file solvepnp.cpp.

bool cv3::solvePnPRansac ( cv::InputArray  objectPoints,
cv::InputArray  imagePoints,
cv::InputArray  cameraMatrix,
cv::InputArray  distCoeffs,
cv::OutputArray  rvec,
cv::OutputArray  tvec,
bool  useExtrinsicGuess = false,
int  iterationsCount = 100,
float  reprojectionError = 8.0,
double  confidence = 0.99,
cv::OutputArray  inliers = cv::noArray(),
int  flags = CV_ITERATIVE 
)

Finds an object pose from 3D-2D point correspondences using the RANSAC scheme.

Parameters:
objectPointsArray of object points in the object coordinate space, 3xN/Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. vector<Point3f> can be also passed here.
imagePointsArray of corresponding image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector<Point2f> can be also passed here.
cameraMatrixInput camera matrix $A = \vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1}$ .
distCoeffsInput vector of distortion coefficients $(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])$ of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
rvecOutput rotation vector (see Rodrigues ) that, together with tvec , brings points from the model coordinate system to the camera coordinate system.
tvecOutput translation vector.
useExtrinsicGuessParameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further optimizes them.
iterationsCountNumber of iterations.
reprojectionErrorInlier 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.
confidenceThe probability that the algorithm produces a useful result.
inliersOutput vector that contains indices of inliers in objectPoints and imagePoints .
flagsMethod for solving a PnP problem (see solvePnP ).

The function estimates an object pose given a set of object points, their corresponding image projections, as well as the camera matrix and the distortion coefficients. This function finds such a pose that minimizes reprojection error, that is, the sum of squared distances between the observed projections imagePoints and the projected (using projectPoints ) objectPoints. The use of RANSAC makes the function resistant to outliers.

Note:
  • An example of how to use solvePNPRansac for object detection can be found at opencv_source_code/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/
bool cv3::solvePnPRansac ( InputArray  _opoints,
InputArray  _ipoints,
InputArray  _cameraMatrix,
InputArray  _distCoeffs,
OutputArray  _rvec,
OutputArray  _tvec,
bool  useExtrinsicGuess,
int  iterationsCount,
float  reprojectionError,
double  confidence,
OutputArray  _inliers,
int  flags 
)

Definition at line 112 of file solvepnp.cpp.



rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:40