Package boofcv.factory.shape
Class ConfigPolygonDetector
java.lang.Object
boofcv.factory.shape.ConfigPolygonDetector
- All Implemented Interfaces:
Configuration
,Serializable
public class ConfigPolygonDetector extends Object implements Configuration
Configuration for
DetectPolygonFromContour
for use in FactoryShapeDetector
.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description boolean
adjustForThresholdBias
Because of how a binary image is created the contour is biases along some sided.ConfigPolygonFromContour
detector
Configuration for detecting polygons from their contourdouble
minimumRefineEdgeIntensity
The minimum allowed edge intensity for a shape after refinement.boolean
refineContour
If true then a contour based refinement will be run to improve the polygon estimate.@Nullable ConfigRefinePolygonLineToImage
refineGray
Configuration for sub-pixel refinement of line. -
Constructor Summary
Constructors Constructor Description ConfigPolygonDetector()
ConfigPolygonDetector(boolean clockwise, int minimumSides, int maximumSides)
ConfigPolygonDetector(int minimumSides, int maximumSides)
Specifies the number of sides in the polygon and uses default settings for everything else -
Method Summary
Modifier and Type Method Description void
checkValidity()
Checks to see if the configuration is valid.ConfigPolygonDetector
setTo(ConfigPolygonDetector src)
String
toString()
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
-
detector
Configuration for detecting polygons from their contour -
minimumRefineEdgeIntensity
public double minimumRefineEdgeIntensityThe minimum allowed edge intensity for a shape after refinement. Used to remove false positives generated by noise, which is especially common when using a local threshold during binarization.
Set to zero to disable.
- See Also:
EdgeIntensityPolygon
-
refineContour
public boolean refineContourIf true then a contour based refinement will be run to improve the polygon estimate. -
adjustForThresholdBias
public boolean adjustForThresholdBiasBecause of how a binary image is created the contour is biases along some sided. This algorithm will adjust the polygon computed directly from a contour to remove that bias. -
refineGray
Configuration for sub-pixel refinement of line. If null then this step is skipped.
-
-
Constructor Details
-
ConfigPolygonDetector
public ConfigPolygonDetector(int minimumSides, int maximumSides)Specifies the number of sides in the polygon and uses default settings for everything else -
ConfigPolygonDetector
public ConfigPolygonDetector(boolean clockwise, int minimumSides, int maximumSides) -
ConfigPolygonDetector
public ConfigPolygonDetector()
-
-
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.- Specified by:
checkValidity
in interfaceConfiguration
-
toString
-