Image Processing Reference
In-Depth Information
(old) and the output (new) image, the number of points per level is denoted as O ( l ) and N ( l )
(for 0 < l < M ), respectively. For square images, there are N 2 points in the input and the
output image, so the sum of points per level in each should be equal:
M
M
() = ()
O
l
N
l
(3.3)
l
=0
l
=0
Also, this should be the same for an arbitrarily chosen level p , since we are aiming for an
output picture with a uniformly flat histogram. So the cumulative histogram up to level p
should be transformed to cover up to the level q in the new histogram:
p
q
(3.4)
() = ()
O
l
N
l
l
=0
l
=0
Since the output histogram is uniformly flat, the cumulative histogram up to level p should
be a fraction of the overall sum. So the number of points per level in the output picture is
the ratio of the number of points to the range of levels in the output image:
2
N
N
() =
l
(3.5)
NN
-
max
min
So the cumulative histogram of the output picture is:
q
2
N
(3.6)
() =
N
l
q
NN
-
l
=0
max
min
By Equation 3.4 this is equal to the cumulative histogram of the input image, so:
p
2
N
(3.7)
q
=
O
( )
l
NN
-
l
=0
max
min
This gives a mapping for the output pixels at level q , from the input pixels at level p as:
p
NN
-
max
min
(3.8)
q
=
()
O
l
2
N
l
=0
This gives a mapping function that provides an output image that has an approximately flat
histogram. The mapping function is given by phrasing Equation 3.8 as an equalising
function ( E ) of the level ( q ) and the image ( O ) as
p
NN
-
max
min
Eq
(
,
O
) =
()
O
l
(3.9)
2
N
l
=0
The output image is then
N x , y = E ( O x , y , O ) (3.10)
The result of equalising the eye image is shown in Figure 3.6 . The intensity equalised
image, Figure 3.6 (c) has much better defined features (especially around the eyes) than in
the original version (Figure 3.1 ). The histogram, Figure 3.6 (d), reveals the non-linear
mapping process whereby white and black are not assigned equal weight, as they were in
intensity normalisation. Accordingly, more pixels are mapped into the darker region and
the brighter intensities become better spread, consistent with the aims of histogram
equalisation.
Search WWH ::




Custom Search