Class MaximumLineDistance
java.lang.Object
boofcv.alg.shapes.polyline.splitmerge.MaximumLineDistance
- All Implemented Interfaces:
SplitSelector
Selects the point which is the farthest away from the line.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareScore(double scoreA, double scoreB) Compares two scores against each othervoidselectSplitPoint(List<Point2D_I32> contour, int indexA, int indexB, boofcv.alg.shapes.polyline.splitmerge.PolylineSplitMerge.SplitResults results) Selects the best point to split a long along a contour.
-
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:SplitSelectorSelects 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:
selectSplitPointin interfaceSplitSelector- Parameters:
contour- List of points along a contour in orderindexA- Start of lineindexB- End of lineresults- Where to split
-
compareScore
public int compareScore(double scoreA, double scoreB) Description copied from interface:SplitSelectorCompares two scores against each other- Specified by:
compareScorein interfaceSplitSelector- Parameters:
scoreA- ScorescoreB- Score- Returns:
- 1 = scoreA is best, 0 both equal, -1 scoreB is best
-