Package boofcv.abst.shapes.polyline
Class ConfigPolylineSplitMerge
java.lang.Object
boofcv.abst.shapes.polyline.BaseConfigPolyline
boofcv.abst.shapes.polyline.ConfigPolylineSplitMerge
- All Implemented Interfaces:
Configuration
,Serializable
Configuration for
PolylineSplitMerge
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptiondouble
If the contour between two corners is longer than this multiple of the distance between the two corners then it will be rejected as not convex.double
Used to adjust the penalty for adding a new corner.How many corners past the max it will fit a polygon to.int
maximum number of points along a side it will sample when computing a score used to limit computational cost of large contoursMaximum allowed error along a single side in Eclidean distance in pixels.int
The minimum length of a sideint
Extra refinement that it does after the initial polyline has been found.double
If the error forside is less than this it is considered a perfect fit and the side won't be split.Fields inherited from class boofcv.abst.shapes.polyline.BaseConfigPolyline
convex, loops, maximumSides, minimumSides
-
Constructor Summary
-
Method Summary
Methods inherited from class boofcv.abst.shapes.polyline.BaseConfigPolyline
setTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface boofcv.struct.Configuration
serializeActiveFields, serializeInitialize
-
Field Details
-
minimumSideLength
public int minimumSideLengthThe minimum length of a side -
extraConsider
How many corners past the max it will fit a polygon to. This enables it to recover from mistakes. Relative: Maximum number of sides. -
cornerScorePenalty
public double cornerScorePenaltyUsed to adjust the penalty for adding a new corner. Larger numbers will bias it towards shapes with fewer sides. For simple convex shapes 0.2 is a reasonable value. For complex concave shapes 0.025 seems to do better. -
thresholdSideSplitScore
public double thresholdSideSplitScoreIf the error forside is less than this it is considered a perfect fit and the side won't be split. Adjust this value to improve the speed. Try setting to zero if corners are precise enough. -
maxNumberOfSideSamples
public int maxNumberOfSideSamplesmaximum number of points along a side it will sample when computing a score used to limit computational cost of large contours -
convexTest
public double convexTestIf the contour between two corners is longer than this multiple of the distance between the two corners then it will be rejected as not convex. larger values make the tolerance weaker and smaller values make it more strict. Setting it too small can make it reject convex shapes. -
maxSideError
Maximum allowed error along a single side in Eclidean distance in pixels. Relative to number of pixels in contour. -
refineIterations
public int refineIterationsExtra refinement that it does after the initial polyline has been found. Set to a value above zero to use this feature.
-
-
Constructor Details
-
ConfigPolylineSplitMerge
public ConfigPolylineSplitMerge()
-
-
Method Details
-
setTo
-
checkValidity
public void checkValidity()Description copied from interface:Configuration
Checks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect. -
toString
-