Class AssociatedPair

java.lang.Object
boofcv.struct.geo.AssociatedPair
Direct Known Subclasses:
AssociatedPairTrack

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.
      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(Point2D_F64 p1, 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(Point2D_F64 p1, 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 Details

    • setTo

      public AssociatedPair setTo(AssociatedPair original)
    • setTo

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

      public AssociatedPair setTo(Point2D_F64 p1, double p2_x, double p2_y)
      Assigns this object to be equal to the passed in values.
    • setTo

      public AssociatedPair setTo(double p1_x, double p1_y, Point2D_F64 p2)
      Assigns this object to be equal to the passed in values.
    • setTo

      public AssociatedPair 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.
    • zero

      public void zero()
      Sets internal points to zero
    • 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()
      Overrides:
      toString in class Object