Module imagingbook.common
Interface AdaptiveThresholder
- All Superinterfaces:
Thresholder
- All Known Implementing Classes:
BernsenThresholder
,NiblackThresholder
,NiblackThresholder.Box
,NiblackThresholder.Disk
,NiblackThresholder.Gauss
,SauvolaThresholder
Common interface to be implemented by all adaptive (i.e., non-global) thresholders. See Sec. 9.2 of [1] for an overview.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/08/01
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.threshold.Thresholder
Thresholder.BackgroundMode
-
Method Summary
Modifier and TypeMethodDescriptionCalculates a adaptive "threshold surface" for the specifiedByteProcessor
and returns it as anotherByteProcessor
.default boolean
Thresholds the specifiedByteProcessor
(8-bit image), which is modified.default void
Thresholds aByteProcessor
image by a threshold surface specified as aByteProcessor
.default void
Thresholds aByteProcessor
image by a threshold surface specified as aFloatProcessor
.
-
Method Details
-
getThreshold
Calculates a adaptive "threshold surface" for the specifiedByteProcessor
and returns it as anotherByteProcessor
.- Parameters:
bp
- the input image- Returns:
- the threshold surface
-
threshold
Thresholds aByteProcessor
image by a threshold surface specified as aByteProcessor
.- Parameters:
I
- the input image (gets modified)Q
- the threshold surface
-
threshold
Thresholds aByteProcessor
image by a threshold surface specified as aFloatProcessor
.- Parameters:
I
- the input image (gets modified)Q
- the threshold surface
-
threshold
Description copied from interface:Thresholder
Thresholds the specifiedByteProcessor
(8-bit image), which is modified. Does nothing and returnstrue
if no valid threshold could be found (e.g., if all image pixels have the same value).- Specified by:
threshold
in interfaceThresholder
- Parameters:
ip
- aByteProcessor
(8-bit image)- Returns:
true
iff the operation was successful
-