Image Processing Reference
In-Depth Information
If a> 1 the contrast is increased and if a< 1 the contrast is decreased. For exam-
ple when a
2 the pixels 112 and 114 will get the values 224 and 228, respectively.
The difference between them is increased by a factor 2 and the contrast is therefore
increased. In Fig. 4.4 the effect of changing the contrast can be seen.
If we combine the equations for brightness, Eq. 4.1 , and contrast, Eq. 4.2 ,we
g(x,y) = a · f(x,y) + b
which is the equation of a straight line. Let us look at an example of how to apply
this equation. Say we are interested in a certain part of the input image where the
contrast might not be sufficient. We therefore find the range of the pixels in this part
of the image and map them to the entire range,
in the output image. Say
that the minimum pixel value and maximum pixel values in the input image are 100
and 150, respectively. Changing the contrast then means to say that all pixel value
below 100 are set to zero in the output and all pixel values above 150 are set to 255
in the output image. The pixels in the range
0 , 255
100 , 150
are then mapped to
0 , 255
using Eq. 4.3 where a and b are defined as follows:
f 2
f 1
f 1
where f 1 =
100 and f 2 =
Non-linear Gray-Level Mapping
Gray-level mapping is not limited to linear mappings as defined by Eq. 4.3 . In fact
the designer is free to define the gray-level mapping as she pleases as long as there
is one and only one output value for each input value. Often the designer will utilize
a well defined equation/graph as opposed to defining a new one. Below three of the
most common non-linear mapping functions are presented.
4.2.1 Gamma Mapping
In many cameras and display devices (flat panel televisions for example) it is use-
ful to be able to increase or decrease the contrast in the dark gray levels and the
light gray levels individually since humans have a non-linear perception of contrast.
A commonly used non-linear mapping is gamma mapping, which is defined for
Search WWH ::

Custom Search