java.lang.Object
imagingbook.common.threshold.adaptive.NiblackThresholder
- All Implemented Interfaces:
AdaptiveThresholder
,Thresholder
- Direct Known Subclasses:
NiblackThresholder.Box
,NiblackThresholder.Disk
,NiblackThresholder.Gauss
This is an implementation of the adaptive thresholder proposed by Niblack in [1]. See Sec. 9.2.2 of [2] for a detailed description. It comes in three different version, depending on the type of local support region:
NiblackThresholder.Box
: uses a rectangular (box-shaped) support region;NiblackThresholder.Disk
: uses a circular (disk-shaped) support region (see [2], Alg. 9.8);NiblackThresholder.Gauss
: uses a 2D isotropic Gaussian support region (see [2], Alg. 9.9 and Prog. 9.2).
NiblackThresholder
itself is abstract and thus cannot be
instantiated.
[1] W. Niblack. "An Introduction to Digital Image Processing". Prentice-Hall
(1986).
[2] W. Burger, M.J. Burge, Digital Image Processing – An
Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/08/01
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Implementation of Niblack's adaptive thresholder using a rectangular (box-shaped) support region (concrete implementation of abstract classNiblackThresholder
).static class
Implementation of Niblack's adaptive thresholder using a circular (disk-shaped) support region (concrete implementation of abstract classNiblackThresholder
).static class
Implementation of Niblack's adaptive thresholder using a 2D Gaussian support region (concrete implementation of abstract classNiblackThresholder
).static class
Parameters for classNiblackThresholder
.static enum
Nested classes/interfaces inherited from interface imagingbook.common.threshold.Thresholder
Thresholder.BackgroundMode
-
Method Summary
Modifier and TypeMethodDescriptionstatic NiblackThresholder
create
(NiblackThresholder.RegionType regType, NiblackThresholder.Parameters params) Static convenience method for creating aNiblackThresholder
with a specific support region type.Calculates a adaptive "threshold surface" for the specifiedByteProcessor
and returns it as anotherByteProcessor
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.common.threshold.adaptive.AdaptiveThresholder
threshold, threshold, threshold
-
Method Details
-
getThreshold
Description copied from interface:AdaptiveThresholder
Calculates a adaptive "threshold surface" for the specifiedByteProcessor
and returns it as anotherByteProcessor
.- Specified by:
getThreshold
in interfaceAdaptiveThresholder
- Parameters:
I
- the input image- Returns:
- the threshold surface
-
create
public static NiblackThresholder create(NiblackThresholder.RegionType regType, NiblackThresholder.Parameters params) Static convenience method for creating aNiblackThresholder
with a specific support region type. Note thatNiblackThresholder
itself is abstract and cannot be instantiated (see concrete sub-typesNiblackThresholder.Box
,NiblackThresholder.Disk
,NiblackThresholder.Gauss
).- Parameters:
regType
- support region typeparams
- other parameters- Returns:
- an instance of
NiblackThresholder
-