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
FieldsModifier and TypeFieldDescriptionbooleanIf true then it thresholds downdoubleThe threshold to apply to the image.intMaximum pixel value.intMinimum pixel value.floatPositive parameter used to tune threshold in members of the Niblack family.floatThreshold for NICK.doubleScale factor applied to computed threshold.booleanIf 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks to see if the configuration is valid.static ConfigThresholdfixed(double value) static ConfigThresholdglobal(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, waitMethods 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:ConfigurationChecks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect.- Specified by:
checkValidityin interfaceConfiguration
-
toString
-