Package boofcv.abst.shapes.polyline
Class NewSplitMerge_to_PointsToPolyline
java.lang.Object
boofcv.abst.shapes.polyline.NewSplitMerge_to_PointsToPolyline
- All Implemented Interfaces:
PointsToPolyline
Wrapper around
PolylineSplitMerge
for PointsToPolyline
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
isConvex()
boolean
isLoop()
Is it configured for loops or lines?boolean
process
(List<Point2D_I32> input, DogArray_I32 vertexes) Computes a polyline from the set of image pixels.void
setConvex
(boolean convex) Specifies if the found polygons will be convex or not.void
setMaximumSides
(int maximum) Specifies the maximum allowed sides.void
setMinimumSides
(int minimum) Specifies the minimum number of sides in a polyline that's returned By default the minimum is 3.
-
Constructor Details
-
NewSplitMerge_to_PointsToPolyline
-
-
Method Details
-
process
Description copied from interface:PointsToPolyline
Computes a polyline from the set of image pixels.- Specified by:
process
in interfacePointsToPolyline
- Parameters:
input
- (Input) List of points in ordervertexes
- (Output) Indexes in the input list which are corners in the polyline- Returns:
- true if successful or false if no fit could be found which matched the requirements
-
setMinimumSides
public void setMinimumSides(int minimum) Description copied from interface:PointsToPolyline
Specifies the minimum number of sides in a polyline that's returned By default the minimum is 3.- Specified by:
setMinimumSides
in interfacePointsToPolyline
- Parameters:
minimum
- The minimum number of allowed vertices
-
getMinimumSides
public int getMinimumSides()- Specified by:
getMinimumSides
in interfacePointsToPolyline
-
setMaximumSides
public void setMaximumSides(int maximum) Description copied from interface:PointsToPolyline
Specifies the maximum allowed sides. How this is interpreted is implementation specific. For example, two possible interpretations are that it could abort if the number of sides is more than this or to only considered up to this number of sides. The number of found sides will never exceed this number. By default the maximum is Integer.MAX_VALUE.- Specified by:
setMaximumSides
in interfacePointsToPolyline
- Parameters:
maximum
- The maximum number of allowed vertices
-
getMaximumSides
public int getMaximumSides()- Specified by:
getMaximumSides
in interfacePointsToPolyline
-
isLoop
public boolean isLoop()Description copied from interface:PointsToPolyline
Is it configured for loops or lines?- Specified by:
isLoop
in interfacePointsToPolyline
- Returns:
- true means it assumes the input points form a loop.
-
setConvex
public void setConvex(boolean convex) Description copied from interface:PointsToPolyline
Specifies if the found polygons will be convex or not. If the polyline doesn't sloop this should be set to false. Default is true.- Specified by:
setConvex
in interfacePointsToPolyline
-
isConvex
public boolean isConvex()- Specified by:
isConvex
in interfacePointsToPolyline
-