boofcv.alg.geo.robust
Class DistanceAffine2DSq
- java.lang.Object
-
- boofcv.alg.geo.robust.DistanceAffine2DSq
-
- All Implemented Interfaces:
- DistanceFromModel<Affine2D_F64,AssociatedPair>
public class DistanceAffine2DSq extends java.lang.Object implements DistanceFromModel<Affine2D_F64,AssociatedPair>
Applies an affine transformation to the associated pair and computes the euclidean distance squared between their locations. This reduces computations by avoiding the square root functions, which is computationally expensive. While both this error metric and euclidean distance have the same minimum, this exaggerates the magnitude of outliers. The transform is applied to the "keyLoc".
-
-
Constructor Summary
Constructors Constructor and Description DistanceAffine2DSq()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecomputeDistance(AssociatedPair pt)Computes the distance the point is from the model.voidcomputeDistance(java.util.List<AssociatedPair> points, double[] distance)Computes the distance a set of points is from the model and saves the results in the provided array.voidsetModel(Affine2D_F64 model)Sets the model parameters.
-
-
-
Method Detail
-
setModel
public void setModel(Affine2D_F64 model)
Description copied from interface:DistanceFromModelSets the model parameters.- Specified by:
setModelin interfaceDistanceFromModel<Affine2D_F64,AssociatedPair>- Parameters:
model- Model parameters.
-
computeDistance
public double computeDistance(AssociatedPair pt)
Description copied from interface:DistanceFromModelComputes the distance the point is from the model.- Specified by:
computeDistancein interfaceDistanceFromModel<Affine2D_F64,AssociatedPair>- Parameters:
pt- Point being evaluated. Not modified.- Returns:
- Distance the point is from the model.
-
computeDistance
public void computeDistance(java.util.List<AssociatedPair> points, double[] distance)
Description copied from interface:DistanceFromModelComputes the distance a set of points is from the model and saves the results in the provided array.- Specified by:
computeDistancein interfaceDistanceFromModel<Affine2D_F64,AssociatedPair>- Parameters:
points- Set of points which are to be evaluated.distance- Where model distance is stored.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG