Package boofcv.factory.filter.binary
Class ConfigThreshold
java.lang.Object
boofcv.factory.filter.binary.ConfigThreshold
- All Implemented Interfaces:
Configuration
,Serializable
- Direct Known Subclasses:
ConfigThresholdBlockMinMax
,ConfigThresholdLocalOtsu
Configuration for all threshold types.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionboolean
If true then it thresholds downdouble
The threshold to apply to the image.int
Maximum pixel value.int
Minimum pixel value.float
Positive parameter used to tune threshold in members of the Niblack family.float
Threshold for NICK.double
Scale factor applied to computed threshold.boolean
If a block threshold is being used then this indicates if the threshold should be computed using a local 3x3 block region (true) or just one block (false).Which algorithm to useRadius of adaptive threshold. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks to see if the configuration is valid.static ConfigThreshold
fixed
(double value) static ConfigThreshold
global
(ThresholdType type) static <T extends ConfigThreshold>
Tlocal
(ThresholdType type, int width) static <T extends ConfigThreshold>
Tlocal
(ThresholdType type, ConfigLength width) setTo
(ConfigThreshold src) 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
-
type
Which algorithm to use -
fixedThreshold
public double fixedThresholdThe threshold to apply to the image. Only valid for fixed threshold. -
scale
public double scaleScale 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 downIf true then it thresholds down -
width
Radius of adaptive threshold. If relative then it's relative to the min(width,height) of the image -
niblackK
public float niblackKPositive parameter used to tune threshold in members of the Niblack family. Try 0.3 or 0.5 -
nickK
public float nickKThreshold for NICK. -0.1 to -0.2 is recommended- See Also:
-
minPixelValue
public int minPixelValueMinimum pixel value. Only used for some algorithms. -
maxPixelValue
public int maxPixelValueMaximum pixel value. Only used for some algorithms. -
thresholdFromLocalBlocks
public boolean thresholdFromLocalBlocksIf a block threshold is being used then this indicates if the threshold should be computed using a local 3x3 block region (true) or just one block (false). The local region should result in a less abrupt change in threshold.
-
-
Constructor Details
-
ConfigThreshold
public ConfigThreshold()
-
-
Method Details
-
fixed
-
global
-
local
-
local
-
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
-