boofcv.factory.filter.binary
Class ConfigThreshold
- java.lang.Object
-
- boofcv.factory.filter.binary.ConfigThreshold
-
- All Implemented Interfaces:
- Configuration, java.io.Serializable
- Direct Known Subclasses:
- ConfigThresholdBlockMinMax
public class ConfigThreshold extends java.lang.Object implements Configuration
Configuration for all threshold types.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description booleandownIf true then it thresholds downdoublefixedThresholdThe threshold to apply to the image.intmaxPixelValueMaximum pixel value.intminPixelValueMinimum pixel value.intradiusRadius of adaptive threshold.floatsavolaKPositive parameter used to tune threshold in Savola.doublescaleScale factor applied to computed threshold.ThresholdTypetypeWhich algorithm to use
-
Constructor Summary
Constructors Constructor and Description ConfigThreshold()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcheckValidity()Checks to see if the configuration is valid.static ConfigThresholdfixed(double value)static ConfigThresholdglobal(ThresholdType type)static ConfigThresholdlocal(ThresholdType type, int radius)java.lang.StringtoString()
-
-
-
Field Detail
-
type
public ThresholdType type
Which algorithm to use
-
fixedThreshold
public double fixedThreshold
The threshold to apply to the image. Only valid for fixed threshold.
-
scale
public double scale
Scale factor applied to computed threshold. Only used with adaptive techniques. 0.95 is a good starting value when tuning. It will remove much of the noise in nearly uniform regions without degrading interesting features by much.
-
down
public boolean down
If true then it thresholds down
-
radius
public int radius
Radius of adaptive threshold.
-
savolaK
public float savolaK
Positive parameter used to tune threshold in Savola. Try 0.3- See Also:
ThresholdType.LOCAL_SAVOLA
-
minPixelValue
public int minPixelValue
Minimum pixel value. Only used for some algorithms.
-
maxPixelValue
public int maxPixelValue
Maximum pixel value. Only used for some algorithms.
-
-
Method Detail
-
fixed
public static ConfigThreshold fixed(double value)
-
global
public static ConfigThreshold global(ThresholdType type)
-
local
public static ConfigThreshold local(ThresholdType type, int radius)
-
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