The continuous range of light intensity
received by the
digital image acquisition system need be quantized to gray levels
(e.g., ). The numbers of gray levels of the following eight
images are respectively 256, 128, 64, 32, 16, 8, 4, and 2, respectively.
- Uniform distribution
Define boundaries
|
(1) |
where
. And define the discrete gray
levels to represent the L intervals:
|
(2) |
Then the quantization can be defined as a function
iff |
(3) |
- Mean square error optimization
Define mean square error of the quantization process as
|
(4) |
where is distribution of input intensify . The optimal quantization
in terms of and can be found by minimizing , by solving
|
(5) |
This method requires to be known. The previous quantization is optimal when
is a uniform distribution. When is not uniform, more gray levels
will be assigned to the gray scale regions corresponding to higher .
- Contrast equalization
The perceived contrast is a function of the intensity. Specifically, we
perceive the same contrast between the object and its surrounding if
|
(6) |
where is the intensity and
is the intensity
difference, the absolute contrast (Weber's law). For example,
|
(7) |
i.e., a high contrast of
at a high absolute intensity
is perceived the same as a much lower contrast of
at a low absolute intensity . In other words„ we are less sensitive to
contrast when the intensity is high. As another example, consider the
perceived brightness of a 3-way light bulb with 50, 100 and 150 Watts (with
the assumption that the brightness is proportional to the power consumption).
The perceived contrast between 50 and 100 is higher than that between 100 and
150 as
. Consequently, the perceived contrast can
be defined as a logarithmic function of the intensity:
|
(8) |
As shown in the figure, to perceive the same contrast, larger intensity
difference is needed for higher intensity regions than lower ones.
To most efficiently use the limited number of gray levels available, we can
allocate more gray levels in the low intensity region where our eye is more
sensitive to contrast) than in high intensity region.
Weber's law describes a general phenominon in human perception. Another
example is the difference between different sound frequencies. The difference
between (middle C, 261.63 Hz) and (523.25 Hz) is an octave,
perceived the same as the difference between and (1046.5 Hz),
although the frequency differences between the two pairs are quite different
(261.63 Hz. vs. 523.25 Hz).
- Gamma correction
In the image acquisition process, nonlinear mapping may occur in various
stages. For example, in the camera system, the in-coming light intensity
may be nonlinearly mapped to the film or digital recording sensors, in the
cathode ray tube (CRT), the applied voltage may be nonlinearly mapped to
the brightness of the CRT display, and in the biological visual system, the
in-coming light intensity is nonlinearly perceived by retina and the visual
cortex of the brain. The goal of
gamma correction
is to compensate for all such nonlinear mappings, the
following power function that relates the input to the output can
be considered:
|
(9) |
where the ranges of both the input and output are normalized so that
. Here is a constant scaling factor, and is
a parameter that characterizes the nonlinearity. Obviously when ,
is linearly related to . Otherwise, we have a nonlinear mapping. As
an example, the nonlinear CRT mapping modeled by
can be
corrected by another nonlinear mapping
,
as shown below: