Class AssociatedPair

Direct Known Subclasses:

public class AssociatedPair
extends Object

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

  • Field Details

    • p1

      public Point2D_F64 p1
      Location of the feature in the first image
    • p2

      public Point2D_F64 p2
      Location of the feature in the second image.
  • Constructor Details

    • AssociatedPair

      public AssociatedPair()
    • AssociatedPair

      public AssociatedPair​(double x1, double y1, double x2, double y2)
      Creates a new associated point from the two provided points.
      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​(Point2D_F64 p1, Point2D_F64 p2)
      Assigns the value to the two passed in features. A copy of the features is made.
      p1 - image 1 location
      p2 - image 2 location
    • AssociatedPair

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

    • setTo

      public void setTo​(AssociatedPair original)
    • setTo

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

      public void setTo​(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​(Point2D_F64 p1, Point2D_F64 p2)
      Changes the references to the passed in objects.
    • getP1

      public Point2D_F64 getP1()
    • getP2

      public Point2D_F64 getP2()
    • copy

      public AssociatedPair copy()
    • distance

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

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

      public String toString()
      toString in class Object