Package boofcv.factory.shape
Class ConfigPolygonDetector
java.lang.Object
boofcv.factory.shape.ConfigPolygonDetector
- All Implemented Interfaces:
Configuration
,Serializable
Configuration for
DetectPolygonFromContour
for use in FactoryShapeDetector
.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Because of how a binary image is created the contour is biases along some sided.Configuration for detecting polygons from their contourdouble
The minimum allowed edge intensity for a shape after refinement.boolean
If true then a contour based refinement will be run to improve the polygon estimate.@Nullable ConfigRefinePolygonLineToImage
Configuration for sub-pixel refinement of line. -
Constructor Summary
ConstructorDescriptionConfigPolygonDetector
(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
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:
-
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
-