java.lang.Object
imagingbook.common.threshold.global.MaxEntropyThresholder
- All Implemented Interfaces:
GlobalThresholder
,Thresholder
This is an implementation of the global thresholder proposed by Kapur et al. in [1]. See Sec. 9.1.5 (Alg. 9.5) of [2] for a detailed description.
[1] J. N. Kapur, P. K. Sahoo, and A. K. C. Wong. A new method for gray-level picture thresholding using the entropy
of the histogram. Computer Vision, Graphics, and Image Processing 29, 273–285 (1985).
[2] W. Burger, M.J. Burge,
Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/08/21
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.threshold.Thresholder
Thresholder.BackgroundMode
-
Field Summary
Fields inherited from interface imagingbook.common.threshold.global.GlobalThresholder
NoThreshold
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
getThreshold
(int[] h) Returns a single (global) threshold value for the specified histogram.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.global.GlobalThresholder
getThreshold, threshold
-
Constructor Details
-
MaxEntropyThresholder
public MaxEntropyThresholder()
-
-
Method Details
-
getThreshold
Description copied from interface:GlobalThresholder
Returns a single (global) threshold value for the specified histogram.- Specified by:
getThreshold
in interfaceGlobalThresholder
- Parameters:
h
- a histogram (array of frequencies)- Returns:
- a single (global) threshold value
-