Class PointMatch

java.lang.Object
stitching.model.PointMatch

public class PointMatch extends Object
A link between two Points that are expected to be ideally at the same location in the world coordinate space.

The link is directed, such that each link touches only p1.

Author:
Stephan Saalfeld
  • Field Details

    • o

    • weights

      protected float[] weights
    • weight

      protected float weight
    • strength

      protected float strength
  • Constructor Details

    • PointMatch

      public PointMatch(Point p1, Point p2, float[] weights, float strength)
      Constructor Create a PointMatch with an Array of weights and a strength. The Array of weights will be copied. Strength gives the amount of application: strength = 0 means p1 will not be transferred, strength = 1 means p1 will be fully transferred
      Parameters:
      p1 - Point 1
      p2 - Point 2
      weights - Array of weights
      strength - how much should applyByStrength(Model, float) affect p1
    • PointMatch

      public PointMatch(Point p1, Point p2, float[] weights)
      Constructor Create a PointMatch with an Array of weights. The Array of weights will be copied.
      Parameters:
      p1 - Point 1
      p2 - Point 2
      weights - Array of weights
    • PointMatch

      public PointMatch(Point p1, Point p2, float weight)
      Constructor Create a PointMatch with one weight.
      Parameters:
      p1 - Point 1
      p2 - Point 2
      weight - Weight
    • PointMatch

      public PointMatch(Point p1, Point p2, float weight, OverlapProperties o)
    • PointMatch

      public PointMatch(Point p1, Point p2, float weight, float strength)
      Constructor Create a PointMatch with one weight and strength. Strength gives the amount of application: strength = 0 means p1 will not be transferred, strength = 1 means p1 will be fully transferred
      Parameters:
      p1 - Point 1
      p2 - Point 2
      weight - Weight
      strength - how much should applyByStrength(Model, float) affect p1
    • PointMatch

      public PointMatch(Point p1, Point p2)
      Constructor Create a PointMatch without weight.
      Parameters:
      p1 - Point 1
      p2 - Point 2
  • Method Details

    • getP1

      public final Point getP1()
    • getP2

      public final Point getP2()
    • getWeights

      public final float[] getWeights()
    • setWeights

      public final void setWeights(float[] weights)
    • getWeight

      public final float getWeight()
    • setWeight

      public final void setWeight(int index, float weight)
    • calculateWeight

      protected final void calculateWeight()
    • getDistance

      public final float getDistance()
    • apply

      public final void apply(Model model)
      Apply a Model to p1, update distance.
      Parameters:
      model -
    • applyByStrength

      public final void applyByStrength(Model model, float amount)
      Apply a Model to p1 with a given amount, update distance.
      Parameters:
      model -
      amount -
    • flip

      public static final ArrayList<PointMatch> flip(Collection<PointMatch> matches)
      Flip symmetrically, weights remains unchanged.
      Parameters:
      matches -
      Returns: