Package boofcv.alg.sfm.robust
Class GenerateScaleTranslate2D
- java.lang.Object
-
- boofcv.alg.sfm.robust.GenerateScaleTranslate2D
-
- All Implemented Interfaces:
org.ddogleg.fitting.modelset.ModelGenerator<ScaleTranslate2D,boofcv.struct.geo.AssociatedPair>
public class GenerateScaleTranslate2D extends java.lang.Object implements org.ddogleg.fitting.modelset.ModelGenerator<ScaleTranslate2D,boofcv.struct.geo.AssociatedPair>
Estimates aScaleTranslate2Dfrom two 2D point correspondences. The transform will take a point from p1 to p2. The algorithm works by finding the centroid of p1 and p2. Scale is found by finding the average change in vector length between p1 and p2 and the centroids. Translation is found by the translation between the two centroids, adjusted for change in scale. If more than two points are provided the extra points are ignored.
-
-
Constructor Summary
Constructors Constructor Description GenerateScaleTranslate2D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangenerate(java.util.List<boofcv.struct.geo.AssociatedPair> dataSet, ScaleTranslate2D output)intgetMinimumPoints()
-
-
-
Method Detail
-
generate
public boolean generate(java.util.List<boofcv.struct.geo.AssociatedPair> dataSet, ScaleTranslate2D output)- Specified by:
generatein interfaceorg.ddogleg.fitting.modelset.ModelGenerator<ScaleTranslate2D,boofcv.struct.geo.AssociatedPair>
-
getMinimumPoints
public int getMinimumPoints()
- Specified by:
getMinimumPointsin interfaceorg.ddogleg.fitting.modelset.ModelGenerator<ScaleTranslate2D,boofcv.struct.geo.AssociatedPair>
-
-