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
ConstructorsModifierConstructorDescriptionprotectedMatchCloudToCloudIcp(MotionTransformPoint<SE, P> motion, NearestNeighbor<P> nn, IterativeClosestPoint.Distance<P> distance, double maxDistanceSq, StoppingCondition stop) Configures ICP -
Method Summary
Modifier and TypeMethodDescriptionbooleancompute()Computes the transform between the two point clouds.getIcp()intReturns 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.booleanIf true then the input list to source is modified.voidsetDestination(List<P> destination) Sets the destination point cloud.voidProvides 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:MatchCloudToCloudProvides the list of source points.WARNING: Do not modify the passed in list until after processing has finished.
- Specified by:
setSourcein 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:MatchCloudToCloudSets 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:
setDestinationin interfaceMatchCloudToCloud<SE extends InvertibleTransform,P extends GeoTuple> - Parameters:
destination- Point cloud. Not modified.
-
compute
public boolean compute()Description copied from interface:MatchCloudToCloudComputes the transform between the two point clouds. Returns if it was successful or not.- Specified by:
computein 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:MatchCloudToCloudReturns the found transform from source to destination. Must callMatchCloudToCloud.compute()first.- Specified by:
getSourceToDestinationin interfaceMatchCloudToCloud<SE extends InvertibleTransform,P extends GeoTuple> - Returns:
- transform
-
isModifiedSource
public boolean isModifiedSource()Description copied from interface:MatchCloudToCloudIf true then the input list to source is modified.- Specified by:
isModifiedSourcein 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:MatchCloudToCloudReturns 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:
getMatchedSourcePointsin interfaceMatchCloudToCloud<SE extends InvertibleTransform,P extends GeoTuple> - Returns:
- Number of matched points.
-
getIcp
-