Interface ModelMatcher<Model,Point>

Type Parameters:
Model - Type of model being fitted.
Point - Type of data point being fitted.
All Known Subinterfaces:
ModelMatcherMulti<Point>, ModelMatcherPost<Model,Point>
All Known Implementing Classes:
LeastMedianOfSquares, LeastMedianOfSquares_MT, Ransac, Ransac_MT, RansacMulti, StatisticalDistanceModelMatcher

public interface ModelMatcher<Model,Point>

Given a set of points and it finds a set of model parameters which fit the data robustly. Some of the points are assumed to be noise and are pruned. The set of points which fit the found parameters and their index in the input list are returned.

  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the metric used to evaluate the quality of fit.
    int
    getInputIndex(int matchIndex)
    For an item in the match set, return the index of the item in the original input set.
    A set of points which match the provided parameters.
    int
    This is the minimum number of observations which can be input and produce a valid model.
    Model for the match set
    Returns a class for the input point object
    Returns a class for the input point object
    boolean
    process(List<Point> dataSet)
    Finds a set of points from the provided list that are a good fit for the internal model and computes the fit parameters for the model.
    void
    Resets the model matcher to its original state.
  • Method Details

    • process

      boolean process(List<Point> dataSet)
      Finds a set of points from the provided list that are a good fit for the internal model and computes the fit parameters for the model.
      Parameters:
      dataSet - Set of points (with noise) that are to be fit.
      Returns:
      true if it successfully found a solution or false if not.
    • getModelParameters

      Model getModelParameters()
      Model for the match set
      Returns:
      model.
    • getMatchSet

      List<Point> getMatchSet()
      A set of points which match the provided parameters.
      Returns:
      List of points in the match set.
    • getInputIndex

      int getInputIndex(int matchIndex)
      For an item in the match set, return the index of the item in the original input set.
      Parameters:
      matchIndex - Index of an element in the match set.
      Returns:
      Index of the same element in the original input list.
    • getFitQuality

      double getFitQuality()
      Returns the metric used to evaluate the quality of fit. Meaning is implementation specific. Larger or smaller values could be preferred depending on implementation..
      Returns:
      Quality of fit to matched set of points
    • getMinimumSize

      int getMinimumSize()
      This is the minimum number of observations which can be input and produce a valid model.
      Returns:
      Minimum number of sample points
    • reset

      void reset()
      Resets the model matcher to its original state. This means that given identical inputs it would produce the same outputs
    • getPointType

      Class<Point> getPointType()
      Returns a class for the input point object
    • getModelType

      Class<Model> getModelType()
      Returns a class for the input point object