Package boofcv.alg.filter.binary
Class ThresholdNick_MT
- java.lang.Object
-
- boofcv.alg.filter.binary.ThresholdNick_MT
-
- All Implemented Interfaces:
InputToBinary<boofcv.struct.image.GrayF32>
public class ThresholdNick_MT extends java.lang.Object implements InputToBinary<boofcv.struct.image.GrayF32>
Based off the NICK algorithm described in [1] this is a thresholding algorithm intended for use on low quality ancient documents. A sliding windows approach is employed and is inspired by Niblack. It's designed to better handled "white" and ligh page images by shifting the threshold down.
[1] Khurshid, Khurram, et al. "Comparison of Niblack inspired Binarization methods for ancient documents." Document Recognition and Retrieval XVI. Vol. 7247. International Society for Optics and Photonics, 2009.
-
-
Constructor Summary
Constructors Constructor Description ThresholdNick_MT(boofcv.struct.ConfigLength width, float k, boolean down)Configures the algorithm.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boofcv.struct.image.ImageType<boofcv.struct.image.GrayF32>getInputType()floatgetK()boofcv.struct.ConfigLengthgetWidth()booleanisDown()voidprocess(boofcv.struct.image.GrayF32 input, boofcv.struct.image.GrayU8 output)Converts the input image into a binary image.voidsetDown(boolean down)voidsetK(float k)voidsetWidth(boofcv.struct.ConfigLength width)
-
-
-
Method Detail
-
process
public void process(boofcv.struct.image.GrayF32 input, boofcv.struct.image.GrayU8 output)Converts the input image into a binary image.- Specified by:
processin interfaceInputToBinary<boofcv.struct.image.GrayF32>- Parameters:
input- Input image. Not modified.output- Output binary image. Modified.
-
getInputType
public boofcv.struct.image.ImageType<boofcv.struct.image.GrayF32> getInputType()
- Specified by:
getInputTypein interfaceInputToBinary<boofcv.struct.image.GrayF32>
-
getK
public float getK()
-
setK
public void setK(float k)
-
getWidth
public boofcv.struct.ConfigLength getWidth()
-
setWidth
public void setWidth(boofcv.struct.ConfigLength width)
-
isDown
public boolean isDown()
-
setDown
public void setDown(boolean down)
-
-