Package georegression.fitting.points
Class MatchCloudToCloudIcp<SE extends InvertibleTransform,P extends GeoTuple>
java.lang.Object
georegression.fitting.points.MatchCloudToCloudIcp<SE,P>
- All Implemented Interfaces:
MatchCloudToCloud<SE,
P>
- Direct Known Subclasses:
FactoryIterativeClosestPoint.SE2_F32
,FactoryIterativeClosestPoint.SE2_F64
,FactoryIterativeClosestPoint.SE3_F32
,FactoryIterativeClosestPoint.SE3_F64
public abstract class MatchCloudToCloudIcp<SE extends InvertibleTransform,P extends GeoTuple>
extends Object
implements MatchCloudToCloud<SE,P>
Abstract implementation of ICP for point cloud fitting using an
arbitrary transform
.- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
MatchCloudToCloudIcp
(MotionTransformPoint<SE, P> motion, NearestNeighbor<P> nn, IterativeClosestPoint.Distance<P> distance, double maxDistanceSq, StoppingCondition stop) Configures ICP -
Method Summary
Modifier and TypeMethodDescriptionboolean
compute()
Computes the transform between the two point clouds.getIcp()
int
Returns the number of points from the source list which were matched to to points in the destination list.Returns the found transform from source to destination.boolean
If true then the input list to source is modified.void
setDestination
(List<P> destination) Sets the destination point cloud.void
Provides the list of source points.
-
Constructor Details
-
MatchCloudToCloudIcp
protected MatchCloudToCloudIcp(MotionTransformPoint<SE, P> motion, NearestNeighbor<P> nn, IterativeClosestPoint.Distance<P> distance, double maxDistanceSq, StoppingCondition stop) Configures ICP- Parameters:
motion
- estimates motion between two sets of associated pointsnn
- Nearest-Neighbor searchmaxDistanceSq
- Maximum distance between two paired points. Euclidean squaredstop
- Stopping criteria for ICP iterations
-
-
Method Details
-
setSource
Description copied from interface:MatchCloudToCloud
Provides the list of source points.WARNING: Do not modify the passed in list until after processing has finished.
- Specified by:
setSource
in interfaceMatchCloudToCloud<SE extends InvertibleTransform,
P extends GeoTuple> - Parameters:
source
- Point cloud. CallMatchCloudToCloud.isModifiedSource()
to see if the list is modified.
-
setDestination
Description copied from interface:MatchCloudToCloud
Sets the destination point cloud. In algorithms which involve a costly processing step on one of the point clouds, this is the point cloud it should be done on.WARNING: Do not modify the passed in list until after processing has finished.
- Specified by:
setDestination
in interfaceMatchCloudToCloud<SE extends InvertibleTransform,
P extends GeoTuple> - Parameters:
destination
- Point cloud. Not modified.
-
compute
public boolean compute()Description copied from interface:MatchCloudToCloud
Computes the transform between the two point clouds. Returns if it was successful or not.- Specified by:
compute
in interfaceMatchCloudToCloud<SE extends InvertibleTransform,
P extends GeoTuple> - Returns:
- True if match between the two point clouds could be found. False otherwise
-
getSourceToDestination
Description copied from interface:MatchCloudToCloud
Returns the found transform from source to destination. Must callMatchCloudToCloud.compute()
first.- Specified by:
getSourceToDestination
in interfaceMatchCloudToCloud<SE extends InvertibleTransform,
P extends GeoTuple> - Returns:
- transform
-
isModifiedSource
public boolean isModifiedSource()Description copied from interface:MatchCloudToCloud
If true then the input list to source is modified.- Specified by:
isModifiedSource
in interfaceMatchCloudToCloud<SE extends InvertibleTransform,
P extends GeoTuple> - Returns:
- true if source list is modified, false if not modified
-
getMatchedSourcePoints
public int getMatchedSourcePoints()Description copied from interface:MatchCloudToCloud
Returns the number of points from the source list which were matched to to points in the destination list. Depending on the algorithm this may or may not be a good measure fit goodness.- Specified by:
getMatchedSourcePoints
in interfaceMatchCloudToCloud<SE extends InvertibleTransform,
P extends GeoTuple> - Returns:
- Number of matched points.
-
getIcp
-