Class AssociatedPair


  • public class AssociatedPair
    extends java.lang.Object

    The observed location of a point feature in two camera views. Can be in pixels or normalized image coordinates.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      georegression.struct.point.Point2D_F64 p1
      Location of the feature in the first image
      georegression.struct.point.Point2D_F64 p2
      Location of the feature in the second image.
    • Constructor Summary

      Constructors 
      Constructor Description
      AssociatedPair()  
      AssociatedPair​(boolean declare)
      Constructor which allows the points to not be declared.
      AssociatedPair​(double x1, double y1, double x2, double y2)
      Creates a new associated point from the two provided points.
      AssociatedPair​(georegression.struct.point.Point2D_F64 p1, georegression.struct.point.Point2D_F64 p2)
      Assigns the value to the two passed in features.
      AssociatedPair​(georegression.struct.point.Point2D_F64 p1, georegression.struct.point.Point2D_F64 p2, boolean newInstance)
      Allows features to either be copied or saved as references.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void assign​(georegression.struct.point.Point2D_F64 p1, georegression.struct.point.Point2D_F64 p2)
      Changes the references to the passed in objects.
      AssociatedPair copy()  
      double distance()
      Euclidean distance from p1 to p2
      double distance2()
      Euclidean distance squared from p1 to p2
      georegression.struct.point.Point2D_F64 getP1()  
      georegression.struct.point.Point2D_F64 getP2()  
      void set​(double p1_x, double p1_y, double p2_x, double p2_y)
      Assigns this object to be equal to the passed in values.
      void set​(AssociatedPair original)  
      void set​(georegression.struct.point.Point2D_F64 p1, georegression.struct.point.Point2D_F64 p2)
      Assigns this object to be equal to the passed in values.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • p1

        public georegression.struct.point.Point2D_F64 p1
        Location of the feature in the first image
      • p2

        public georegression.struct.point.Point2D_F64 p2
        Location of the feature in the second image.
    • Constructor Detail

      • AssociatedPair

        public AssociatedPair()
      • AssociatedPair

        public AssociatedPair​(boolean declare)
        Constructor which allows the points to not be declared.
        Parameters:
        declare - If true then new points will be declared
      • AssociatedPair

        public AssociatedPair​(double x1,
                              double y1,
                              double x2,
                              double y2)
        Creates a new associated point from the two provided points.
        Parameters:
        x1 - image 1 location x-axis.
        y1 - image 1 location y-axis.
        x2 - image 2 location x-axis.
        y2 - image 2 location y-axis.
      • AssociatedPair

        public AssociatedPair​(georegression.struct.point.Point2D_F64 p1,
                              georegression.struct.point.Point2D_F64 p2)
        Assigns the value to the two passed in features. A copy of the features is made.
        Parameters:
        p1 - image 1 location
        p2 - image 2 location
      • AssociatedPair

        public AssociatedPair​(georegression.struct.point.Point2D_F64 p1,
                              georegression.struct.point.Point2D_F64 p2,
                              boolean newInstance)
        Allows features to either be copied or saved as references.
        Parameters:
        p1 - image 1 location
        p2 - image 2 location
        newInstance - Should it create new points or save a reference to these instances.
    • Method Detail

      • set

        public void set​(georegression.struct.point.Point2D_F64 p1,
                        georegression.struct.point.Point2D_F64 p2)
        Assigns this object to be equal to the passed in values.
      • set

        public void set​(double p1_x,
                        double p1_y,
                        double p2_x,
                        double p2_y)
        Assigns this object to be equal to the passed in values.
      • assign

        public void assign​(georegression.struct.point.Point2D_F64 p1,
                           georegression.struct.point.Point2D_F64 p2)
        Changes the references to the passed in objects.
      • getP1

        public georegression.struct.point.Point2D_F64 getP1()
      • getP2

        public georegression.struct.point.Point2D_F64 getP2()
      • distance

        public double distance()
        Euclidean distance from p1 to p2
      • distance2

        public double distance2()
        Euclidean distance squared from p1 to p2
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object