CCCoreLib 31 May 2022
CloudCompare Core algorithms
Classes | Public Types | Static Public Member Functions | List of all members
CCCoreLib::ICPRegistrationTools Class Reference

ICP point cloud registration algorithm (Besl et al.). More...

#include <RegistrationTools.h>

Inheritance diagram for CCCoreLib::ICPRegistrationTools:
Inheritance graph
[legend]
Collaboration diagram for CCCoreLib::ICPRegistrationTools:
Collaboration graph
[legend]

Classes

struct  Parameters
 ICP Parameters. More...
 

Public Types

enum  CONVERGENCE_TYPE { MAX_ERROR_CONVERGENCE = 0 , MAX_ITER_CONVERGENCE = 1 }
 Convergence control method.
 
enum  RESULT_TYPE {
  ICP_NOTHING_TO_DO = 0 , ICP_APPLY_TRANSFO = 1 , ICP_ERROR = 100 , ICP_ERROR_REGISTRATION_STEP = 101 ,
  ICP_ERROR_DIST_COMPUTATION = 102 , ICP_ERROR_NOT_ENOUGH_MEMORY = 103 , ICP_ERROR_CANCELED_BY_USER = 104 , ICP_ERROR_INVALID_INPUT = 105
}
 Errors.
 
enum  NORMALS_MATCHING { NO_NORMAL = 0 , OPPOSITE_NORMALS = 1 , SAME_SIDE_NORMALS = 2 , DOUBLE_SIDED_NORMALS = 3 }
 Normals matching method.
 
- Public Types inherited from CCCoreLib::RegistrationTools
enum  TRANSFORMATION_FILTERS {
  SKIP_NONE = 0 , SKIP_RXY = 1 , SKIP_RYZ = 2 , SKIP_RXZ = 4 ,
  SKIP_ROTATION = 7 , SKIP_TX = 8 , SKIP_TY = 16 , SKIP_TZ = 32 ,
  SKIP_TRANSLATION = 56
}
 Transformation constraints.
 
using ScaledTransformation = PointProjectionTools::Transformation
 Shortcut to PointProjectionTools::ScaledTransformation.
 

Static Public Member Functions

static RESULT_TYPE Register (GenericIndexedCloudPersist *modelCloud, GenericIndexedMesh *modelMesh, GenericIndexedCloudPersist *dataCloud, const Parameters &params, ScaledTransformation &totalTrans, double &finalRMS, unsigned &finalPointCount, GenericProgressCallback *progressCb=nullptr)
 Registers two clouds or a cloud and a mesh. More...
 
- Static Public Member Functions inherited from CCCoreLib::RegistrationTools
static void FilterTransformation (const ScaledTransformation &inTrans, int transformationFilters, ScaledTransformation &outTrans)
 'Filters' a transformation by constraining it along certain rotation axes and translation directions More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from CCCoreLib::RegistrationTools
static bool RegistrationProcedure (GenericCloud *P, GenericCloud *X, ScaledTransformation &trans, bool adjustScale=false, ScalarField *coupleWeights=nullptr, PointCoordinateType aPrioriScale=1.0f)
 ICP Registration procedure with optional scale estimation. More...
 

Detailed Description

ICP point cloud registration algorithm (Besl et al.).

Member Function Documentation

◆ Register()

ICPRegistrationTools::RESULT_TYPE ICPRegistrationTools::Register ( GenericIndexedCloudPersist modelCloud,
GenericIndexedMesh modelMesh,
GenericIndexedCloudPersist dataCloud,
const Parameters params,
ScaledTransformation totalTrans,
double &  finalRMS,
unsigned &  finalPointCount,
GenericProgressCallback progressCb = nullptr 
)
static

Registers two clouds or a cloud and a mesh.

This method implements the ICP algorithm (Besl et al.) with various improvements (random sampling, optional weights, normals matching, etc.).

Warning
Be sure to activate an INPUT/OUTPUT scalar field on the point cloud.
The mesh is always the reference/model entity.
Parameters
modelCloudthe reference cloud or the vertices of the reference mesh --> won't move
modelMeshthe reference mesh (optional) --> won't move
dataCloudthe cloud to register --> will move
paramsICP parameters
[out]totalTransthe resulting transformation (once the algorithm has converged)
[out]finalRMSfinal error (RMS)
[out]finalPointCountnumber of points used to compute the final RMS
progressCbthe client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback)
Returns
algorithm result

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