Package boofcv.factory.filter.binary
Class FactoryThresholdBinary
- java.lang.Object
-
- boofcv.factory.filter.binary.FactoryThresholdBinary
-
public class FactoryThresholdBinary extends java.lang.ObjectFactory for creating various filters which convert an input image into a binary one
-
-
Constructor Summary
Constructors Constructor Description FactoryThresholdBinary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>blockMean(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, java.lang.Class<T> inputType)Applies a non-overlapping block mean thresholdstatic <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>blockMinMax(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, double minimumSpread, java.lang.Class<T> inputType)Applies a very fast non-overlapping block thresholding algorithm which uses min/max statistics.static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>blockOtsu(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, boolean otsu2, double tuning, java.lang.Class<T> inputType)Applies a non-overlapping block Otsu thresholdstatic <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>globalEntropy(int minValue, int maxValue, double scale, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>globalFixed(double threshold, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>globalHuang(double minValue, double maxValue, double scale, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>globalLi(double minValue, double maxValue, double scale, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>globalOtsu(double minValue, double maxValue, double scale, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>localGaussian(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>localMean(boofcv.struct.ConfigLength width, double scale, boolean down, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>localNick(boofcv.struct.ConfigLength width, boolean down, float k, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>localOtsu(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean otsu2, double tuning, java.lang.Class<T> inputType)Applies a local Otsu thresholdstatic <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>localSauvola(boofcv.struct.ConfigLength width, boolean down, float k, java.lang.Class<T> inputType)static <T extends boofcv.struct.image.ImageGray<T>>
InputToBinary<T>threshold(ConfigThreshold config, java.lang.Class<T> inputType)Creates threshold using a config class
-
-
-
Method Detail
-
localGaussian
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> localGaussian(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, java.lang.Class<T> inputType)
- Parameters:
regionWidth- Width of square region.scale- Threshold scale adjustmentdown- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
LocalGaussianBinaryFilter
-
localSauvola
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> localSauvola(boofcv.struct.ConfigLength width, boolean down, float k, java.lang.Class<T> inputType)
- Parameters:
width- Width of square region.down- Should it threshold up or down.k- User specified threshold adjustment factor. Must be positive. Try 0.3inputType- Type of input image- Returns:
- Filter to binary
- See Also:
ThresholdSauvola
-
localNick
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> localNick(boofcv.struct.ConfigLength width, boolean down, float k, java.lang.Class<T> inputType)
- Parameters:
width- size of local region. Try 31down- Should it threshold up or down.k- The Niblack factor. Recommend -0.1 to -0.2inputType- Type of input image- Returns:
- Filter to binary
- See Also:
ThresholdNick
-
localMean
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> localMean(boofcv.struct.ConfigLength width, double scale, boolean down, java.lang.Class<T> inputType)
- Parameters:
width- Width of square region.scale- Scale factor adjust for threshold. 1.0 means no change.down- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
GThresholdImageOps.localMean(T, boofcv.struct.image.GrayU8, boofcv.struct.ConfigLength, double, boolean, T, T, boofcv.concurrency.WorkArrays)
-
localOtsu
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> localOtsu(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean otsu2, double tuning, java.lang.Class<T> inputType)
Applies a local Otsu threshold- Parameters:
regionWidth- About how wide and tall you wish a block to be in pixels.scale- Scale factor adjust for threshold. 1.0 means no change.down- Should it threshold up or down.tuning- Tuning parameter. 0 = standard Otsu. Greater than 0 will penalize zero texture.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
ThresholdLocalOtsu
-
blockMinMax
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> blockMinMax(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, double minimumSpread, java.lang.Class<T> inputType)
Applies a very fast non-overlapping block thresholding algorithm which uses min/max statistics.- Parameters:
regionWidth- Approximate size of block regionscale- Scale factor adjust for threshold. 1.0 means no change.down- Should it threshold up or down.minimumSpread- If the difference between min max is less than or equal to this value then it is considered textureless. Set to ≤ -1 to disable.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
ThresholdBlockMinMax
-
blockMean
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> blockMean(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, java.lang.Class<T> inputType)
Applies a non-overlapping block mean threshold- Parameters:
scale- Scale factor adjust for threshold. 1.0 means no change.down- Should it threshold up or down.regionWidth- Approximate size of block regioninputType- Type of input image- Returns:
- Filter to binary
- See Also:
ThresholdBlockMean
-
blockOtsu
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> blockOtsu(boofcv.struct.ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, boolean otsu2, double tuning, java.lang.Class<T> inputType)
Applies a non-overlapping block Otsu threshold- Parameters:
regionWidth- Approximate size of block regionscale- Scale factor adjust for threshold. 1.0 means no change.down- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
ThresholdBlockOtsu
-
globalEntropy
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> globalEntropy(int minValue, int maxValue, double scale, boolean down, java.lang.Class<T> inputType)
- Parameters:
minValue- The minimum value of a pixel in the image. (inclusive)maxValue- The maximum value of a pixel in the image. (inclusive)down- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
GThresholdImageOps.computeEntropy(boofcv.struct.image.ImageGray, double, double)
-
globalFixed
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> globalFixed(double threshold, boolean down, java.lang.Class<T> inputType)
- Parameters:
threshold- threshold value.down- If true then the inequality ≤ is used, otherwise if false then ≥ is used.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
GThresholdImageOps.threshold(T, boofcv.struct.image.GrayU8, double, boolean)
-
globalOtsu
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> globalOtsu(double minValue, double maxValue, double scale, boolean down, java.lang.Class<T> inputType)
- Parameters:
minValue- The minimum value of a pixel in the image. (inclusive)maxValue- The maximum value of a pixel in the image. (inclusive)down- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
GThresholdImageOps.computeOtsu(boofcv.struct.image.ImageGray, double, double)
-
globalLi
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> globalLi(double minValue, double maxValue, double scale, boolean down, java.lang.Class<T> inputType)
- Parameters:
minValue- The minimum value of a pixel in the image. (inclusive)maxValue- The maximum value of a pixel in the image. (inclusive)down- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
GThresholdImageOps.computeLi(int[], int)
-
globalHuang
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> globalHuang(double minValue, double maxValue, double scale, boolean down, java.lang.Class<T> inputType)
- Parameters:
minValue- The minimum value of a pixel in the image. (inclusive)maxValue- The maximum value of a pixel in the image. (inclusive)down- Should it threshold up or down.inputType- Type of input image- Returns:
- Filter to binary
- See Also:
GThresholdImageOps.computeHuang(int[], int)
-
threshold
public static <T extends boofcv.struct.image.ImageGray<T>> InputToBinary<T> threshold(ConfigThreshold config, java.lang.Class<T> inputType)
Creates threshold using a config class- Parameters:
config- ConfigurationinputType- Type of input image- Returns:
- The thresholder
-
-