Image Processing Reference
In-Depth Information
is chosen so as to split the image between an object and its background. This is achieved
by selecting a threshold that gives the best separation of classes, for all pixels in an image.
The theory is beyond the scope of this section and we shall merely survey its results and
give their implementation. The basis is use of the normalised histogram where the number
of points at each level is divided by the total number of points in the image. As such, this
represents a probability distribution for the intensity levels as
N
()
2
l
pl
() =
(3.11)
N
No. of points
Background
Object
Brightness
Optimal threshold value
Figure 3.8
Optimal thresholding
This can be used to compute then zero- and first-order cumulative moments of the
normalised histogram up to the k th level as
k
() =
k
()
p l
(3.12)
l
=1
k
and
() =
k
()
l
p l
(3.13)
l
=1
The total mean level of the image is given by
N
max
Σ l
(3.14)
T =
( )
lpl
=1
The variance of the class separability is then the ratio
2
( T () -
k
())
k
2
B k
() =
k
1,
N
(3.15)
max
()(1 -
k
())
k
The optimal threshold is the level for which the variance of class separability is at its
maximum, namely the optimal threshold T opt is that for which the variance
2
2
(3.16)
(
T
) =
max
(
(
k
))
B
opt
B
1
k
<
N
max
A comparison of uniform thresholding with optimal thresholding is given in Figure 3.9
for the eye image. The threshold selected by Otsu's operator is actually slightly lower than
Search WWH ::




Custom Search