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
-
Method Summary
Modifier and TypeMethodDescriptionint
compareScore
(double scoreA, double scoreB) Compares two scores against each othervoid
selectSplitPoint
(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: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 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:SplitSelector
Compares two scores against each other- Specified by:
compareScore
in interfaceSplitSelector
- Parameters:
scoreA
- ScorescoreB
- Score- Returns:
- 1 = scoreA is best, 0 both equal, -1 scoreB is best
-