Vision and Mobile Robotics Laboratory | Software
|
|
Home | Members | Projects | Publications | Software | Videos | Internal |
ICP2 is an improved version of the previous MeshToolbox ICP program. Like the original ICP, it is an implementation of the Iterative Closest Point algorithm for registering two 3-D point clouds when the clouds are roughly aligned. It is based on algorithms of Besl and McKay (PAMI, February 1992) and Zhang (IJCV 1994). ICP2 is used as a final "polishing" step in the model-building process.
Improvements over ICP include:
The sigmoid weighting function has a similar shape to the Lorentzian but has the advantage that its parameters can be adjusted to approximate a step-edge threshold as well. The sigmoid provides thresholding similar to the dynamic thresholding approach but does not suffer from discontinuities in the error surface due to points crossing the threshold.
Weighting points by the area reduces the resolution dependence of the algorithm. Without area weighting, densely sampled regions have more influence on the transformation.
Filtering non-overlapping points corrects an important limitation of the ICP algorithm. ICP assumes that one data set is a subset of the other. If this is not the case, non-overlapping points can influence the transformation.
A stopping criterion based on the maximum motion of any point in the dataset in one iteration captures the notion that the algorithm should stop when the data stops moving. Using the angleT (change in angles) criterion does not take into account the size of the data.
icp2_main.c contains the command-line interface for ICP. It reads in command line options and writes out the resulting registration.
icp2.c contains the implementation of the icp algorithm.
icp2.h class definition for the icp class.
3dtree.c contains the functions for creation and use of a 3-D closest point search tree.
3dtree.h contains the class definition for a 3-dimensional kDtree.
By typing ICP2 - the following options (format description default) are printed:
Usage: ICP2 - registers model to scene (see ICP2.html for details)
%S scene faceset filename [required]
%S model faceset filename [required]
-output %S transformed model
-translate %F %F %F initial translation [0, 0, 0]
-rotate %F %F %F initial rotation [0, 0, 0]
-readTrans %S read initial transformation from file [off]
-writeTrans %S write final transformation from file [off]
Weighting methods:
-weightMethod %d point weighting method [0]:
0 = sigmoid function, 1 = Lorentzian function,
2 = dynamic threshold, 3 = static threshold
-sigmoid %F %F midpoint offset (dmid) [500] and slope (k) [1] parameters in sigmoid function
-lorentz %F sigma parameter in Lorentzian function [100]
-dynamic %F D parameter in dynamic thresholding [100]
-static %F threshold distance for static thresholding [1000]
Stopping criteria:
-errT %F stop when avg point distance falls below this [0] (sensor units)
-maxIter %d stop when number of iterations reaches this [20]
-distT %F stop when max point movement falls below this [10] (sensor units)
-angleT %F stop when max rotation change falls below this [0] (degrees)
-transT %F stop when translation distance falls below this [0] (sensor units)
-overlap %d filter non-overlapping points (0=off) [1]
-normalT %F angle threshold (in degrees) for compatible normals [20]
-area %d weight points by area of neighbor faces (0=off) [1]
-nPer %d number of perturbations about minimum [0]
In more detail the options are:
%S scene faceset filename [required]
The filename of the scene mesh description. This file must be a VRML indexed faceset with a "Coordinate3" node describing the mesh vertices and an "IndexedFaceSet" node describing the faces.
%S model faceset filename [required]
The filename of the model mesh description. This file must be a VRML indexed faceset with a "Coordinate3" node describing the mesh vertices and an "IndexedFaceSet" node describing the faces.
-output %S transformed model
The filename of the output VRML file. This file will contain the model indexed faceset after transformation by the best transformation calculated by the ICP algorithm.
-translate %F %F %F initial translation [0, 0, 0]
An initial translation to be applied to the model mesh can be supplied with this option.
-rotate %F %F %F initial rotation [0, 0, 0]
An initial rotation (as euler angles ) to be applied to the model mesh can be supplied with this option.
-readTrans %S read initial transformation from file [off]
Read starting transformation from file of six floats. An alternate to using the rotate and translate arguments.
-writeTrans %S write final transformation from file [off]
Write final transformation to file of six floats.
Weighting methods:
-weightMethod %d point weighting method [0]:
0 = sigmoid function, 1 = Lorentzian function,
2 = dynamic threshold, 3 = static threshold
Distance weighting strategy (between vertices of the model and closest points on the scene surface).
-sigmoid %F %F midpoint offset (dmid) [500] and slope (k) [1] parameters in sigmoid function
Parameters to control the sigmoid function when sigmoid weighting is used. sigmoid(x) = exp(k*(dmid - x)) / (1 + exp(k*(dmid - x))). Dmid is the distance such that sigmoid(dmid) = 0.5. k controls the slope of the sigmoid, with larger values giving a steeper slope.
-lorentz %F sigma parameter in Lorentzian function [100]
Parameter to control the Lorentzian function when Lorentzian weighting is used. lorentzian(x) = 1 / (1 + 0.5*(x/sigma)^2).
-dynamic %F D parameter in dynamic thresholding [100]
See Zhang, 1993. The parameter D corresponds to the expected average distance when the registration is good. In the absence of better information, this can be set to the mesh resolution. The initial dynamic threshold is set to 20 times this value.
-static %F threshold distance for static thresholding [1000]
At each iteration, points with distance greater than this threshold are discarded before computing the transformation update.
Stopping criteria:
-errT %F stop when avg point distance falls below this [0] (sensor units)
Error is a weighted average calculated using the current weighting method. Threshold methods assign binary weights to points.
-maxIter %d stop when number of iterations reaches this [20]
The maximum number of iterations that are allowed before the iterations are stopped.
-distT %F stop when max point movement falls below this [10] (sensor units)
Maximum point motion is computed from the bounding box of the model points (max point motion = max motion of bounding box vertices) This is a conservative estimate of the true maximum point motion.
-angleT %F stop when max rotation change falls below this [0] (degrees)
The threshold below which change in rotation (RMS on Euler angles) must fall before the iterations can end.
-transT %F stop when translation distance falls below this [0] (sensor units)
The threshold below which change in translation (RMS) must fall before the iterations can end.
-overlap %d filter non-overlapping points (0=off) [1]
A point on the model overlaps the scene if the closest point on the scene is not a boundary point and if the angle between the normals of the two points is less than normalT.
-normalT %F angle threshold (in degrees) for compatible normals [20]
Threshold on difference between normals of closest points for calculation of overlap.
-area %d weight points by area of neighbor faces (0=off) [1]
Adjusts the point weights in the model by the average area of the neighbor faces. Each neighbor face contributes 1/3 of its total area to the area of a point.
-nPer %d number of perturbations about minimum [0]
Number of times the ICP algorithm is repeated starting from randomly generated poses once the local minimum has been approached with an intial run of the algorithm. By adding perturbations, the likelihood of finding the global minimum is increased.
An example of usage where no options are set thus providing a quick execution is:
ICP2 scene.wrl model.wrl
An example which sets the algorithm to run for a longer time, but probably provide a better answer is:
ICP2 scene.wrl modell.wrl -output model.move.wrl -nPer 20 -distT 5 -maxIter 100