Package boofcv.alg.geo.robust
Class GenerateScaleTranslate2D
java.lang.Object
boofcv.alg.geo.robust.GenerateScaleTranslate2D
- All Implemented Interfaces:
ModelGenerator<ScaleTranslate2D,AssociatedPair>
public class GenerateScaleTranslate2D extends Object implements ModelGenerator<ScaleTranslate2D,AssociatedPair>
Estimates a
ScaleTranslate2D
from 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
Modifier and Type Method Description boolean
generate(List<AssociatedPair> dataSet, ScaleTranslate2D output)
int
getMinimumPoints()
-
Constructor Details
-
GenerateScaleTranslate2D
public GenerateScaleTranslate2D()
-
-
Method Details
-
generate
- Specified by:
generate
in interfaceModelGenerator<ScaleTranslate2D,AssociatedPair>
-
getMinimumPoints
public int getMinimumPoints()- Specified by:
getMinimumPoints
in interfaceModelGenerator<ScaleTranslate2D,AssociatedPair>
-