OpenCV  4.4.0
Open Source Computer Vision
Public Types | Public Member Functions | List of all members
cv::ppf_match_3d::ICP Class Reference

This class implements a very efficient and robust variant of the iterative closest point (ICP) algorithm. The task is to register a 3D model (or point cloud) against a set of noisy target data. The variants are put together by myself after certain tests. The task is to be able to match partial, noisy point clouds in cluttered scenes, quickly. You will find that my emphasis is on the performance, while retaining the accuracy. This implementation is based on Tolga Birdal's MATLAB implementation in here: http://www.mathworks.com/matlabcentral/fileexchange/47152-icp-registration-using-efficient-variants-and-multi-resolution-scheme The main contributions come from: More...

#include <opencv2/surface_matching/icp.hpp>

Public Types

enum  {
  ICP_SAMPLING_TYPE_UNIFORM = 0,
  ICP_SAMPLING_TYPE_GELFAND = 1
}
 

Public Member Functions

 ICP ()
 
 ICP (const int iterations, const float tolerence=0.05f, const float rejectionScale=2.5f, const int numLevels=6, const int sampleType=ICP::ICP_SAMPLING_TYPE_UNIFORM, const int numMaxCorr=1)
 ICP constructor with default arguments. More...
 
virtual ~ICP ()
 
int registerModelToScene (const Mat &srcPC, const Mat &dstPC, double &residual, Matx44d &pose)
 Perform registration. More...
 
int registerModelToScene (const Mat &srcPC, const Mat &dstPC, std::vector< Pose3DPtr > &poses)
 Perform registration with multiple initial poses. More...
 

Detailed Description

This class implements a very efficient and robust variant of the iterative closest point (ICP) algorithm. The task is to register a 3D model (or point cloud) against a set of noisy target data. The variants are put together by myself after certain tests. The task is to be able to match partial, noisy point clouds in cluttered scenes, quickly. You will find that my emphasis is on the performance, while retaining the accuracy. This implementation is based on Tolga Birdal's MATLAB implementation in here: http://www.mathworks.com/matlabcentral/fileexchange/47152-icp-registration-using-efficient-variants-and-multi-resolution-scheme The main contributions come from:

  1. Picky ICP: http://www5.informatik.uni-erlangen.de/Forschung/Publikationen/2003/Zinsser03-ARI.pdf
  2. Efficient variants of the ICP Algorithm: http://docs.happycoders.org/orgadoc/graphics/imaging/fasticp_paper.pdf
  3. Geometrically Stable Sampling for the ICP Algorithm: https://graphics.stanford.edu/papers/stabicp/stabicp.pdf
  4. Multi-resolution registration: http://www.cvl.iis.u-tokyo.ac.jp/~oishi/Papers/Alignment/Jost_MultiResolutionICP_3DIM03.pdf
  5. Linearization of Point-to-Plane metric by Kok Lim Low: https://www.comp.nus.edu.sg/~lowkl/publications/lowk_point-to-plane_icp_techrep.pdf

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ICP_SAMPLING_TYPE_UNIFORM 
ICP_SAMPLING_TYPE_GELFAND 

Constructor & Destructor Documentation

◆ ICP() [1/2]

cv::ppf_match_3d::ICP::ICP ( )
inline
Python:
<ppf_match_3d_ICP object>=cv.ppf_match_3d_ICP()
<ppf_match_3d_ICP object>=cv.ppf_match_3d_ICP(iterations[, tolerence[, rejectionScale[, numLevels[, sampleType[, numMaxCorr]]]]])

◆ ~ICP()

virtual cv::ppf_match_3d::ICP::~ICP ( )
inlinevirtual

◆ ICP() [2/2]

cv::ppf_match_3d::ICP::ICP ( const int  iterations,
const float  tolerence = 0.05f,
const float  rejectionScale = 2.5f,
const int  numLevels = 6,
const int  sampleType = ICP::ICP_SAMPLING_TYPE_UNIFORM,
const int  numMaxCorr = 1 
)
inline
Python:
<ppf_match_3d_ICP object>=cv.ppf_match_3d_ICP()
<ppf_match_3d_ICP object>=cv.ppf_match_3d_ICP(iterations[, tolerence[, rejectionScale[, numLevels[, sampleType[, numMaxCorr]]]]])

ICP constructor with default arguments.

Parameters
[in]iterations
[in]tolerenceControls the accuracy of registration at each iteration of ICP.
[in]rejectionScaleRobust outlier rejection is applied for robustness. This value actually corresponds to the standard deviation coefficient. Points with rejectionScale * &sigma are ignored during registration.
[in]numLevelsNumber of pyramid levels to proceed. Deep pyramids increase speed but decrease accuracy. Too coarse pyramids might have computational overhead on top of the inaccurate registrtaion. This parameter should be chosen to optimize a balance. Typical values range from 4 to 10.
[in]sampleTypeCurrently this parameter is ignored and only uniform sampling is applied. Leave it as 0.
[in]numMaxCorrCurrently this parameter is ignored and only PickyICP is applied. Leave it as 1.

Member Function Documentation

◆ registerModelToScene() [1/2]

int cv::ppf_match_3d::ICP::registerModelToScene ( const Mat srcPC,
const Mat dstPC,
double &  residual,
Matx44d pose 
)
Python:
retval, residual, pose=cv.ppf_match_3d_ICP.registerModelToScene(srcPC, dstPC)
retval, poses=cv.ppf_match_3d_ICP.registerModelToScene(srcPC, dstPC, poses)

Perform registration.

Parameters
[in]srcPCThe input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.
[in]dstPCThe input point cloud for the scene. It is assumed that the model is registered on the scene. Scene remains static. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.
[out]residualThe output registration error.
[out]poseTransformation between srcPC and dstPC.
Returns
On successful termination, the function returns 0.

It is assumed that the model is registered on the scene. Scene remains static, while the model transforms. The output poses transform the models onto the scene. Because of the point to plane minimization, the scene is expected to have the normals available. Expected to have the normals (Nx6).

◆ registerModelToScene() [2/2]

int cv::ppf_match_3d::ICP::registerModelToScene ( const Mat srcPC,
const Mat dstPC,
std::vector< Pose3DPtr > &  poses 
)
Python:
retval, residual, pose=cv.ppf_match_3d_ICP.registerModelToScene(srcPC, dstPC)
retval, poses=cv.ppf_match_3d_ICP.registerModelToScene(srcPC, dstPC, poses)

Perform registration with multiple initial poses.

Parameters
[in]srcPCThe input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.
[in]dstPCThe input point cloud for the scene. Currently, CV_32F is the only supported data type.
[in,out]posesInput poses to start with but also list output of poses.
Returns
On successful termination, the function returns 0.

It is assumed that the model is registered on the scene. Scene remains static, while the model transforms. The output poses transform the models onto the scene. Because of the point to plane minimization, the scene is expected to have the normals available. Expected to have the normals (Nx6).


The documentation for this class was generated from the following file: