boofcv.alg.geo.robust
Class DistanceHomographySq
- java.lang.Object
-
- boofcv.alg.geo.robust.DistanceHomographySq
-
- All Implemented Interfaces:
- DistanceFromModel<Homography2D_F64,AssociatedPair>
public class DistanceHomographySq extends java.lang.Object implements DistanceFromModel<Homography2D_F64,AssociatedPair>
Computes the Euclidean error squared between 'p1' and 'p2' after projecting 'p1' into image 2. Input can be in pixels or normalized image coordinates, but the error for normalized image coordinates doesn't have a physical meaning.
error = (p2'.x - p2.x)2 + (p2'.y - p2.y)2, where p2' is the predicted location and p2 is the observed location.
-
-
Constructor Summary
Constructors Constructor and Description DistanceHomographySq()
-
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(Homography2D_F64 model)Sets the model parameters.
-
-
-
Method Detail
-
setModel
public void setModel(Homography2D_F64 model)
Description copied from interface:DistanceFromModelSets the model parameters.- Specified by:
setModelin interfaceDistanceFromModel<Homography2D_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<Homography2D_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<Homography2D_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