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 specifiedByteProcessorand returns it as anotherByteProcessor.default booleanThresholds the specifiedByteProcessor(8-bit image), which is modified.default voidThresholds aByteProcessorimage by a threshold surface specified as aByteProcessor.default voidThresholds aByteProcessorimage by a threshold surface specified as aFloatProcessor.
-
Method Details
-
getThreshold
Calculates a adaptive "threshold surface" for the specifiedByteProcessorand returns it as anotherByteProcessor.- Parameters:
bp- the input image- Returns:
- the threshold surface
-
threshold
Thresholds aByteProcessorimage by a threshold surface specified as aByteProcessor.- Parameters:
I- the input image (gets modified)Q- the threshold surface
-
threshold
Thresholds aByteProcessorimage by a threshold surface specified as aFloatProcessor.- Parameters:
I- the input image (gets modified)Q- the threshold surface
-
threshold
Description copied from interface:ThresholderThresholds the specifiedByteProcessor(8-bit image), which is modified. Does nothing and returnstrueif no valid threshold could be found (e.g., if all image pixels have the same value).- Specified by:
thresholdin interfaceThresholder- Parameters:
ip- aByteProcessor(8-bit image)- Returns:
trueiff the operation was successful
-