Class TranslationModel2D

All Implemented Interfaces:
CoordinateTransform, InvertibleCoordinateTransform

public class TranslationModel2D extends InvertibleModel
TODO
Author:
Stephan Saalfeld
  • Field Details

    • MIN_SET_SIZE

      protected static final int MIN_SET_SIZE
      See Also:
    • translation

      protected final float[] translation
  • Constructor Details

    • TranslationModel2D

      public TranslationModel2D()
  • Method Details

    • getTranslation

      public float[] getTranslation()
    • getMinSetSize

      public final int getMinSetSize()
      Specified by:
      getMinSetSize in class Model
    • apply

      public float[] apply(float[] point)
      Description copied from interface: CoordinateTransform
      Apply the CoordinateTransform to a location.
      Parameters:
      point -
      Returns:
      transformed location
    • applyInPlace

      public void applyInPlace(float[] point)
      Description copied from interface: CoordinateTransform
      Apply the CoordinateTransform to a location.
      Parameters:
      point -
    • applyInverse

      public float[] applyInverse(float[] point)
      Description copied from interface: InvertibleCoordinateTransform
      Apply the inverse of the model to a point location
      Parameters:
      point -
      Returns:
      transformed point
    • applyInverseInPlace

      public void applyInverseInPlace(float[] point)
      Description copied from interface: InvertibleCoordinateTransform
      apply the inverse of the model to a point location
      Parameters:
      point -
    • toString

      public String toString()
      Description copied from class: Model
      Create a meaningful string representation of the model for save into text-files or display on terminals.
      Specified by:
      toString in class Model
    • fit

      public final void fit(Collection<PointMatch> matches) throws NotEnoughDataPointsException
      Description copied from class: Model
      Fit the Model to a set of data points minimizing the global transfer error. This is assumed to be implemented as a least squares minimization. Use ransac and/ or Model.filter(Class, Collection, Collection) to remove outliers from your data points The estimated model transfers match.p2.local to match.p1.world.
      Specified by:
      fit in class Model
      Parameters:
      matches - set of point correpondences
      Throws:
      NotEnoughDataPointsException - an exception if matches does not contain enough data points
    • shake

      public final void shake(Collection<PointMatch> matches, float scale, float[] center)
      change the model a bit estimates the necessary amount of shaking for each single dimensional distance in the set of matches
      Specified by:
      shake in class Model
      Parameters:
      matches - point matches
      scale - gives a multiplicative factor to each dimensional distance (scales the amount of shaking)
      center - local pivot point for centered shakes (e.g. rotation)
    • clone

      public TranslationModel2D clone()
      Description copied from class: Model
      Clone the model.
      Specified by:
      clone in class InvertibleModel