Table of Contents

Class ICP

Namespace
Emgu.CV.PpfMatch3d
Assembly
Emgu.CV.dll

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.

public class ICP : UnmanagedObject, IDisposable
Inheritance
ICP
Implements
Inherited Members

Remarks

The following patents have been issued for methods embodied in this software: "Recognition and pose determination of 3D objects in 3D scenes using geometric point pair descriptors and the generalized Hough Transform", Bertram Heinrich Drost, Markus Ulrich, EP Patent 2385483 (Nov. 21, 2012), assignee: MVTec Software GmbH, 81675 Muenchen (Germany); "Recognition and pose determination of 3D objects in 3D scenes", Bertram Heinrich Drost, Markus Ulrich, US Patent 8830229 (Sept. 9, 2014), assignee: MVTec Software GmbH, 81675 Muenchen (Germany). Further patents are pending. For further details, contact MVTec Software GmbH (info@mvtec.com). Note that restrictions imposed by these patents(and possibly others) exist independently of and may be in conflict with the freedoms granted in this license, which refers to copyright of the program, not patents for any methods that it implements.Both copyright and patent law must be obeyed to legally use and redistribute this program and it is not the purpose of this license to induce you to infringe any patents or other property right claims or to contest validity of any such claims.If you redistribute or use the program, then this license merely protects you from committing copyright infringement. It does not protect you from committing patent infringement.So, before you do anything with this program, make sure that you have permission to do so not merely in terms of copyright, but also in terms of patent law. Please note that this license is not to be understood as a guarantee either.If you use the program according to this license, but in conflict with patent law, it does not mean that the licensor will refund you for any losses that you incur if you are sued for your patent infringement.

Constructors

ICP(int, float, float, int, SamplingType, int)

Constructor to a very efficient and robust variant of the iterative closest point (ICP) algorithm.

public ICP(int iterations, float tolerance = 0.05, float rejectionScale = 2.5, int numLevels = 6, ICP.SamplingType sampleType = SamplingType.Uniform, int numMaxCorr = 1)

Parameters

iterations int

number of iterations

tolerance float

Controls the accuracy of registration at each iteration of ICP.

rejectionScale float

Robust outlier rejection is applied for robustness. This value actually corresponds to the standard deviation coefficient. Points with rejectionScale * sigma are ignored during registration.

numLevels int

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.

sampleType ICP.SamplingType

Currently this parameter is ignored and only uniform sampling is applied.

numMaxCorr int

Currently this parameter is ignored and only PickyICP is applied. Leave it as 1.

Methods

DisposeObject()

Release the unmanaged resources associated with the ICP

protected override void DisposeObject()

RegisterModelToScene(Mat, Mat, VectorOfPose3D)

Perform registration with multiple initial poses.

public int RegisterModelToScene(Mat srcPC, Mat dstPC, VectorOfPose3D poses)

Parameters

srcPC Mat

The input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.

dstPC Mat

The input point cloud for the scene. Currently, CV_32F is the only supported data type.

poses VectorOfPose3D

Input poses to start with but also list output of poses.

Returns

int

On successful termination, the function returns 0.

RegisterModelToScene(Mat, Mat, ref double, Mat)

Perform registration.

public int RegisterModelToScene(Mat srcPC, Mat dstPC, ref double residual, Mat pose)

Parameters

srcPC Mat

The input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.

dstPC Mat

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.

residual double

The output registration error.

pose Mat

Transformation between srcPC and dstPC.

Returns

int

On successful termination, the function returns 0.