Class MaximumLineDistance

java.lang.Object
boofcv.alg.shapes.polyline.splitmerge.MaximumLineDistance
All Implemented Interfaces:
SplitSelector

public class MaximumLineDistance extends Object implements SplitSelector
Selects the point which is the farthest away from the line.
  • Constructor Details

    • MaximumLineDistance

      public MaximumLineDistance()
  • Method Details

    • selectSplitPoint

      public void selectSplitPoint(List<Point2D_I32> contour, int indexA, int indexB, boofcv.alg.shapes.polyline.splitmerge.PolylineSplitMerge.SplitResults results)
      Description copied from interface: SplitSelector
      Selects the best point to split a long along a contour. Start and end locations are always traversed in the positive direction along the contour.
      Specified by:
      selectSplitPoint in interface SplitSelector
      Parameters:
      contour - List of points along a contour in order
      indexA - Start of line
      indexB - End of line
      results - Where to split
    • compareScore

      public int compareScore(double scoreA, double scoreB)
      Description copied from interface: SplitSelector
      Compares two scores against each other
      Specified by:
      compareScore in interface SplitSelector
      Parameters:
      scoreA - Score
      scoreB - Score
      Returns:
      1 = scoreA is best, 0 both equal, -1 scoreB is best