boofcv.factory.shape
Class ConfigPolygonDetector
- java.lang.Object
-
- boofcv.factory.shape.ConfigPolygonDetector
-
- All Implemented Interfaces:
- Configuration, java.io.Serializable
public class ConfigPolygonDetector extends java.lang.Object implements Configuration
Configuration forBinaryPolygonDetectorfor use inFactoryShapeDetector.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description booleancanTouchBorderIf false then polygons which touch the image border are prunedbooleanclockwiseWill the found polygons be in clockwise order?intcontour2Poly_iterationsNumber of split and merge iterations when converting contour into polygondoublecontour2Poly_minimumSideFractionThe minimum allowed length of a side as a fraction of the total contour lengthdoublecontour2Poly_splitFractionA line is split if a point along the contour between the two end points has a distance from the line which is greater than this fraction of the line's lengthbooleanconvexDoes it require that the found polygons be convex?intmaximumSidesMaximum number of sidesdoubleminContourImageWidthFractionSpecifies the minimum allowed contour length as a fraction of the input image's width.doubleminimumEdgeIntensityThe minimum allowed edge intensity for a shape.intminimumSidesMinimum number of sidesConfigurationrefineConfiguration for sub-pixel refinement of line.doublesplitPenaltyMagic number used to penalize a polygon when a new corner is added
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcheckValidity()Checks to see if the configuration is valid.java.lang.StringtoString()
-
-
-
Field Detail
-
minimumSides
public int minimumSides
Minimum number of sides
-
maximumSides
public int maximumSides
Maximum number of sides
-
canTouchBorder
public boolean canTouchBorder
If false then polygons which touch the image border are pruned
-
contour2Poly_splitFraction
public double contour2Poly_splitFraction
A line is split if a point along the contour between the two end points has a distance from the line which is greater than this fraction of the line's length
-
contour2Poly_iterations
public int contour2Poly_iterations
Number of split and merge iterations when converting contour into polygon
-
contour2Poly_minimumSideFraction
public double contour2Poly_minimumSideFraction
The minimum allowed length of a side as a fraction of the total contour length
-
splitPenalty
public double splitPenalty
Magic number used to penalize a polygon when a new corner is added- See Also:
MinimizeEnergyPrune
-
minimumEdgeIntensity
public double minimumEdgeIntensity
The minimum allowed edge intensity for a shape. 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:
PolygonEdgeIntensity
-
minContourImageWidthFraction
public double minContourImageWidthFraction
Specifies the minimum allowed contour length as a fraction of the input image's width. Smaller numbers mean smaller objects are allowed.
-
clockwise
public boolean clockwise
Will the found polygons be in clockwise order?
-
convex
public boolean convex
Does it require that the found polygons be convex?
-
refine
public Configuration refine
Configuration for sub-pixel refinement of line. If null then this step is skipped. Defaults to a line refinement algorithm.
-
-
Constructor Detail
-
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)
-
-
Method Detail
-
checkValidity
public void checkValidity()
Description copied from interface:ConfigurationChecks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect.- Specified by:
checkValidityin interfaceConfiguration
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG