Class CustomBinarizationFilter
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class CustomBinarizationFilter extends ParametricFilter
Automatic binarization filter. This filter is a good starting point for most use cases.
-
-
Field Summary
Fields Modifier and Type Field Description private final BinarizationFilterPreset
preset
private final OutputMode
outputMode
private final Float
denoise
private final Integer
radius
-
Constructor Summary
Constructors Constructor Description CustomBinarizationFilter(BinarizationFilterPreset preset, OutputMode outputMode, Float denoise, Integer radius)
-
Method Summary
Modifier and Type Method Description final BinarizationFilterPreset
getPreset()
Preset of binarization filter parameters that are found to perform well on different types of documents. final OutputMode
getOutputMode()
Output mode of the filter. final Float
getDenoise()
Value controlling the amount of noise removal. final Integer
getRadius()
Filter radius. -
-
Constructor Detail
-
CustomBinarizationFilter
CustomBinarizationFilter(BinarizationFilterPreset preset, OutputMode outputMode, Float denoise, Integer radius)
-
-
Method Detail
-
getPreset
final BinarizationFilterPreset getPreset()
Preset of binarization filter parameters that are found to perform well on different types of documents.
-
getOutputMode
final OutputMode getOutputMode()
Output mode of the filter. BINARY will return a black and white image, GRAYSCALE will return an antialiased grayscale image.
-
getDenoise
final Float getDenoise()
Value controlling the amount of noise removal. Value between 0 and 1. Too little noise removal may result in a very noisy image, worsening readability. Too much noise removal may result in the degradation of text, again, worsening readability.
-
getRadius
final Integer getRadius()
Filter radius. The bigger the radius, the slower the filter and generally the less noise in the result. The radius is used for both shadows removal and the calculation of local statistics in the main body of the filter. Higher radius usually allows to cope better with regions of light text on dark background. All the values larger than 512 are clamped to 512.
-
-
-
-