OpenCV
3.2.0
Open Source Computer Vision

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/47152icpregistrationusingefficientvariantsandmultiresolutionscheme The main contributions come from: More...
#include "icp.hpp"
Public Types  
enum  ICP_SAMPLING_TYPE { ICP_SAMPLING_TYPE_UNIFORM, ICP_SAMPLING_TYPE_GELFAND } 
Public Member Functions  
ICP ()  
ICP (const int iterations, const float tolerence=0.05, const float rejectionScale=2.5, const int numLevels=6, const ICP_SAMPLING_TYPE sampleType=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, double pose[16]) 
Perform registration. More...  
int  registerModelToScene (const Mat &srcPC, const Mat &dstPC, std::vector< Pose3DPtr > &poses) 
Perform registration with multiple initial poses. More...  
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/47152icpregistrationusingefficientvariantsandmultiresolutionscheme The main contributions come from:
cv::ppf_match_3d::ICP::ICP  (  ) 

virtual 
cv::ppf_match_3d::ICP::ICP  (  const int  iterations, 
const float  tolerence = 0.05 , 

const float  rejectionScale = 2.5 , 

const int  numLevels = 6 , 

const ICP_SAMPLING_TYPE  sampleType = ICP_SAMPLING_TYPE_UNIFORM , 

const int  numMaxCorr = 1 

) 
ICP constructor with default arguments.
[in]  iterations  
[in]  tolerence  Controls the accuracy of registration at each iteration of ICP. 
[in]  rejectionScale  Robust outlier rejection is applied for robustness. This value actually corresponds to the standard deviation coefficient. Points with rejectionScale * &sigma are ignored during registration. 
[in]  numLevels  Number 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]  sampleType  Currently this parameter is ignored and only uniform sampling is applied. Leave it as 0. 
[in]  numMaxCorr  Currently this parameter is ignored and only PickyICP is applied. Leave it as 1. 
int cv::ppf_match_3d::ICP::registerModelToScene  (  const Mat &  srcPC, 
const Mat &  dstPC,  
double &  residual,  
double  pose[16]  
) 
Perform registration.
[in]  srcPC  The input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type. 
[in]  dstPC  The 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]  residual  The output registration error. 
[out]  pose  Transformation between srcPC and dstPC. 
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).
int cv::ppf_match_3d::ICP::registerModelToScene  (  const Mat &  srcPC, 
const Mat &  dstPC,  
std::vector< Pose3DPtr > &  poses  
) 
Perform registration with multiple initial poses.
[in]  srcPC  The input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type. 
[in]  dstPC  The input point cloud for the scene. Currently, CV_32F is the only supported data type. 
[in,out]  poses  Input poses to start with but also list output of poses. 
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).