Class DistanceAffine2DSq

  • All Implemented Interfaces:
    org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.Affine2D_F64,​AssociatedPair>

    public class DistanceAffine2DSq
    extends java.lang.Object
    implements org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.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 Detail

      • DistanceAffine2DSq

        public DistanceAffine2DSq()
    • Method Detail

      • setModel

        public void setModel​(georegression.struct.affine.Affine2D_F64 model)
        Specified by:
        setModel in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.Affine2D_F64,​AssociatedPair>
      • computeDistance

        public double computeDistance​(AssociatedPair pt)
        Specified by:
        computeDistance in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.Affine2D_F64,​AssociatedPair>
      • computeDistance

        public void computeDistance​(java.util.List<AssociatedPair> points,
                                    double[] distance)
        Specified by:
        computeDistance in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.Affine2D_F64,​AssociatedPair>
      • getPointType

        public java.lang.Class<AssociatedPair> getPointType()
        Specified by:
        getPointType in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.Affine2D_F64,​AssociatedPair>
      • getModelType

        public java.lang.Class<georegression.struct.affine.Affine2D_F64> getModelType()
        Specified by:
        getModelType in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.affine.Affine2D_F64,​AssociatedPair>