Package georegression.fitting.points
Class IterativeClosestPoint<SE extends InvertibleTransform,P extends GeoTuple>
java.lang.Object
georegression.fitting.points.IterativeClosestPoint<SE,P>
public class IterativeClosestPoint<SE extends InvertibleTransform,P extends GeoTuple>
extends Object
A straight forward implementation of the Iterative Closest Point (ICP) algorithm for 2D or 3D objects. ICP
works by finding a locally optimal rigid body transform that minimizes the error between a set of points
and a model. The model can be described in several different formats and is implement as an interface
ClosestPointToModel
.
While this implementation is primarily designed for simplicity, generic, and correctness, its performance will be primarily determined by the efficiency of the ClosestPointToModel provided to it. This is especially true for complex models with large number of points.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionIterativeClosestPoint
(StoppingCondition stop, MotionTransformPoint<SE, P> motion, IterativeClosestPoint.Distance<P> distance) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Mean square error between the model and the set of points after the optimal transformation has been foundFound rigid body transformation from model to points.int
boolean
Computes the best fit transformvoid
setModel
(ClosestPointToModel model) The model that the input points is being fitted against.
-
Constructor Details
-
IterativeClosestPoint
public IterativeClosestPoint(StoppingCondition stop, MotionTransformPoint<SE, P> motion, IterativeClosestPoint.Distance<P> distance)
-
-
Method Details
-
getFoundError
public double getFoundError()Mean square error between the model and the set of points after the optimal transformation has been found -
getPointsToModel
Found rigid body transformation from model to points. -
setModel
The model that the input points is being fitted against. -
process
Computes the best fit transform- Parameters:
points
- Points which are to matched to a model. Their state is modified to the optimal fit location.
-
getTotalMatched
public int getTotalMatched()
-