- All Superinterfaces:
Thresholder
- All Known Implementing Classes:
IsodataThresholder
,IsodataThresholderSlow
,MaxEntropyThresholder
,MeanThresholder
,MedianThresholder
,MinErrorThresholder
,MinMaxThresholder
,OtsuThresholder
,QuantileThresholder
Common interface to be implemented by all global thresholders. See Sec. 9.1 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
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfloat
getThreshold
(int[] h) Returns a single (global) threshold value for the specified histogram.default float
Returns a single (global) threshold value for the specifiedByteProcessor
(8-bit image).default boolean
Thresholds the specifiedByteProcessor
(8-bit image), which is modified.
-
Field Details
-
NoThreshold
- See Also:
-
-
Method Details
-
getThreshold
Returns a single (global) threshold value for the specified histogram.- Parameters:
h
- a histogram (array of frequencies)- Returns:
- a single (global) threshold value
-
getThreshold
Returns a single (global) threshold value for the specifiedByteProcessor
(8-bit image).- Parameters:
bp
- aByteProcessor
(8-bit image)- Returns:
- a single (global) threshold value
-
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
-