Optimum Global Thresholding Using Otsu's Method
Optimum Global Thresholding Using Otsu's Method
Optimum Global Thresholding Using Otsu's Method
Otsu’s method is optimum in the sense that it maximizes the between-class variance, a
well-known measure used in statistical discriminant analysis. The basic idea is that well-
thresholded classes should be distinct with respect to the intensity values of their pixels and,
conversely, that a threshold giving the best separation between classes in term of their intensity
values would be the best threshold. In addition to its optimality, Otsu’s method has the important
property that is based entirely on computations performed on the histogram of an image, an
easily obtainable 1-D array.
1. Compute the normalized histogram of the input image. Denote the components of the
histogram by pi, i=0, 1, 2, …, L-1.
2. Compute the cumulative sums, P1(k), for k =0, 1, 2, ..., L-1, using Eq:
k
P1(k) = ∑ pi
i=0
3. Compute the cumulative means, m(k), for k=0, 1, 2, …, L-1, using Eq:
k
m(k) = ∑ i p i
i=0
5. Compute the between-class variance, σ2B(k), for k=0, 1, 2, …, L-1, using Eq:
2
[mG P 1 ( k ) −m(k )]2
σ B(k) =
P1 ( k ) [1−P1 ( k ) ]
6. Obtain the Otsu threshold, k*, as the value of k for which σ 2B(k) is maximum. If the
maximum is not unique, obtain k* by averaging the values of k corresponding to the
various maxima detected.
7. Obtain the separability measure, η*, by evaluating the following equation at k=k*.
σ 2B (k )
η(k) =
σ 2G
The Canny Edge Detector
The Canny method is generally acknowledged as the best ‘all-round’ edge detection
method developed to date. Canny aimed to develop an edge detector that satisfied three key
criteria:
Entropy-Based Thresholding
Entropy measures of thresholding are based on the concept of entropy. The entropy
statistic is high if a variable is well distributed over the available range, and low if it is well
ordered and narrowly distributed: specifically, entropy is a measure of disorder, and is zero for a
perfectly ordered system. The concept of entropy thresholding is to threshold at an intensity for
which the sum of the entropies of the two intensity probability distributions thereby separated is
maximized. The reason for this is to obtain the greatest reduction in entropy—i.e., the greatest
increase in order—by applying the threshold: in other words, the most appropriate threshold
level is the one that imposes the greatest order on the system, and thus leads to the most
meaningful result.
The intensity probability distribution is again divided into two classes—those with gray
levels up to the threshold value k and those with gray levels above k. This leads to two
probability distributions A and B:
p 1 p2 pk
A: , , …,
Pk Pk Pk
pk +1 pk +2 pL
B: , , …,
1−Pk 1−Pk 1−Pk
where
k
Pk = ∑ pi
i=1
L
1-Pk = ∑ pi
i=k+1
A further stage is required to combine the various energies in a number of different ways,
providing several outputs that can be fed into a classifier to decide upon the particular type of
texture at each pixel location. If necessary, principal components analysis is used at this point to
help select a suitable set of intermediate outputs.