Package boofcv.factory.filter.binary
Class ConfigThreshold
- java.lang.Object
-
- boofcv.factory.filter.binary.ConfigThreshold
-
- All Implemented Interfaces:
boofcv.struct.Configuration,java.io.Serializable
- Direct Known Subclasses:
ConfigThresholdBlockMinMax,ConfigThresholdLocalOtsu
public class ConfigThreshold extends java.lang.Object implements boofcv.struct.ConfigurationConfiguration for all threshold types.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description booleandownIf true then it thresholds downdoublefixedThresholdThe threshold to apply to the image.intmaxPixelValueMaximum pixel value.intminPixelValueMinimum pixel value.floatnickKThreshold for NICK.floatsavolaKPositive parameter used to tune threshold in Savola.doublescaleScale factor applied to computed threshold.booleanthresholdFromLocalBlocksIf 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).ThresholdTypetypeWhich algorithm to useboofcv.struct.ConfigLengthwidthRadius of adaptive threshold.
-
Constructor Summary
Constructors Constructor Description ConfigThreshold()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckValidity()static ConfigThresholdfixed(double value)static ConfigThresholdglobal(ThresholdType type)static <T extends ConfigThreshold>
Tlocal(ThresholdType type, int width)static <T extends ConfigThreshold>
Tlocal(ThresholdType type, boofcv.struct.ConfigLength width)voidsetTo(ConfigThreshold src)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
-
width
public boofcv.struct.ConfigLength width
Radius of adaptive threshold. If relative then it's relative to the min(width,height) of the image
-
savolaK
public float savolaK
Positive parameter used to tune threshold in Savola. Try 0.3- See Also:
ThresholdType.LOCAL_SAVOLA
-
nickK
public float nickK
Threshold for NICK. -0.1 to -0.2 is recommended- See Also:
ThresholdType.LOCAL_NICK
-
minPixelValue
public int minPixelValue
Minimum pixel value. Only used for some algorithms.
-
maxPixelValue
public int maxPixelValue
Maximum pixel value. Only used for some algorithms.
-
thresholdFromLocalBlocks
public boolean thresholdFromLocalBlocks
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). The local region should result in a less abrupt change in threshold.
-
-
Method Detail
-
fixed
public static ConfigThreshold fixed(double value)
-
global
public static ConfigThreshold global(ThresholdType type)
-
local
public static <T extends ConfigThreshold> T local(ThresholdType type, int width)
-
local
public static <T extends ConfigThreshold> T local(ThresholdType type, boofcv.struct.ConfigLength width)
-
setTo
public void setTo(ConfigThreshold src)
-
checkValidity
public void checkValidity()
- Specified by:
checkValidityin interfaceboofcv.struct.Configuration
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-