Você está na página 1de 4

IMAGE CONTRAST ENHANCEMENT BASED ON INTENSITY-PAIR DISTRIBUTION

*Tzu-Cheng Jen, **Brian Hsieh and *Sheng-Jyh Wang


*Inst. of Electronics, National Chiao Tung University, Hsinchu, Taiwan, R.O.C.
**AU Optronics Corporation, Hsinchu, Taiwan, R.O.C.
E-mail: shengjyh@cc.nctu.edu.tw

ABSTRACT Another popular approach for contrast enhancement is


Current contrast enhancement algorithms sometimes come adaptive histogram equalization (AHE). The operation of
with undesired drawbacks, like the loss of tiny details, AHE is similar to HE, except that the histogram is now
enhancement of image noise, occasional over- based on localized data. AHE usually provides significant
enhancement, and unnatural look of the processed images. contrast enhancement and may well preserve fine details.
In this paper, we propose a new approach for contrast However, from time to time, over-enhancement may
enhancement based on the use of a so-called intensity-pair happen and the enhanced images may look unnatural.
distribution. This distribution possesses both local Recently, [4] and [5] propose the approach for
information and global information of the image content. enhancement based on AHE. They use overlapped-mask
By analyzing the content of intensity-pair distribution, a to acquire local image data. Further, in order to obtain
set of expansion forces are generated for contrast nature-look processing result, in their approaches, the
enhancement while another set of anti-expansion forces original image is added to the processed image. However,
are generated to suppress image noise. To avoid over- computational complexity is still a problem for these
enhancement and preserve the natural look of the approaches. On the other hand, [6] proposes a contrast
processed images, a magnitude mapping function is also enhancement method based on neural networks. In this
proposed. Experimental results show that the proposed approach, the training data and decision rules would have
algorithm does provide a flexible and reliable way for significant influence on the processed result.
contrast enhancement. In this paper, we propose a new approach that
combines the advantages of global approaches, such as
1. INTRODUCTION HE, and local approaches, such as AHE. The
Taking a picture in an excessively bright or dark implementation of this approach is simple and the
environment makes the captured image less contrasted. To performance of enhancement is quite promising. This
enhance image contrast, Histogram Equalization (HE) is a approach is based on a so-called intensity-pair distribution.
widely used approach and has been recognized as the With the intensity-pair distribution, a set of expansion
ancestor of plentiful contrast enhancement algorithms [1]. forces is generated for contrast enhancement while
This HE approach analyzes the histogram of the given another set of anti-expansion forces is generated to
image and assigns a broader range of gray values to these suppress image noise. To avoid over-enhancement and to
gray levels with larger counts. Since this approach only preserve the natural look of the processed images, a
takes global information into account, some portions of magnitude mapping function is also proposed. In this
the image may get over-enhanced and the processed paper, the proposed approach is introduced in Section 2.
image may look unnatural. Moreover, because the pixel Some experimental results are then demonstrated in
counts of tiny regions only contribute small portions of Section 3. Finally, conclusions are given in Section 4.
the histogram, in some situations the contrast of tiny
regions may get compressed after contrast enhancement. 2. PROPOSED METHOD
[2], [3] indicate that the over-enhancement problem in In our algorithm, the first step is to extract both local
HE may be properly avoided by preserving the intensity information and global information of the given image.
mean of the image data. However, with the preservation Here, we define a so-called intensity-pair distribution. For
of intensity mean, the enhanced images may still look a given image, we test at each pixel the intensity
unnatural since some other factors, like color and object difference between that pixel and each of its 8-connection
shape, may also get affected during the contrast neighbors. Figure 1 shows an illustration of a pixel and its
enhancement process. 8-connection neighbors. Due to the commutative property
of intensity pair, we only check 4 neighboring pixels,

0-7803-9134-9/05/$20.00 ©2005 IEEE I-913


instead of 8, as we scan the image in the raster order. That With this intensity-pair distribution, we can easily
is, for the pixel at E in Figure 1, we only check the illustrate how an intensity mapping function changes the
intensity difference between that pixel and its upper-left contents of the given image. In Figure 3(a), we show two
pixel (A), upper pixel (B), upper-right pixel (C), and left intensity mapping functions. The green curve in Figure
pixel (D). 3(a) indicates the default mapping function, which keeps
the image in its original form. As we change the intensity
mapping function from the green curve to the red curve,
the image contents are modified. In this example, the
intensity value 80 is changed to a value smaller than 80,
while the intensity value 175 is changed to a value larger
than 175. Hence, the intensity-pair distribution shown in
Figure 2(b) will be changed to be the intensity-pair
Fig.1. An illustration of a pixel and its 8-connection neighbors. distribution shown in Figure 3(b). After this modification
of intensity mapping function, the image contrast in
After the computation of intensity differences, we may Figure 2(a) is enhanced.
imagine that we have formed an intensity-pair distribution
as shown in Figure 2. Figure 2(a) shows an example of a Intensity Value after Processing
2D image. As we calculate the intensity difference 255

Intensity value
between adjacent pixels, we have formed four different
175

intensity pairs, {(80, 80), (175, 80), (80, 175), (175, 175)}.
If we ignore the pair order and treat (175, 80) and (80,
175) as the same type of pair, these four types of pairs are
80

further merged into three types of pairs, {(80, 80), (175,


80), (175, 175)}. As we count the total pixel number for
0

0 80 175 255 Intensity value


each type of intensity pair, we may generate the intensity- Intensity Value before Processing
pair distribution as shown in Figure 2(b). Here, the values (a) (b)
at (80, 80), (175, 80), and (175, 175) are 21, 13, and 21, Fig.3. (a) The intensity mapping function between the intensity
respectively. Similarly, for a real image shown in Figure value of the original image and the intensity value of the
2(c), its intensity-pair distribution can be easily calculated processed image. (b) The change of intensity-pair distribution
after the modification of intensity mapping function.
as shown in Figure 2(d). Especially, if the intensity
difference of an intensity-pair is large than a pre-selected
Next, we explain how to generate the intensity
threshold, that intensity-pair is treated as an edge pair.
mapping function for contrast enhancement, based on the
information revealed in the original intensity-pair
distribution. Take the same example shown in Figure 2(b),
Intensity value

(175,175)

the intensity pair (175, 80) corresponds to a strong edge in


175 175 175 175
the image. To enhance the contrast of this edge, we may
175 175 175 175 (80,80) (175,80)
80 80 80 80
want to generate a mapping function that looks like the
red curve in Figure 3(a). This can be achieved by
80 80 80 80
generating a train of forces between 80 and 175 first, as
Intensity value shown in Figure 4. Then the integration operation is
(a) (b)
applied to the expansion forces to generate a so-called
expansion function. This expansion function is added to
the original mapping function to pull up the mapping
function, as shown in the lower-right of Figure 4. Then,
the modified mapping function is normalized to the range
of 0~255 to form the final mapping function, as shown in
the lower-left part of Figure 4. With this procedure, an
intensity mapping function that enhances the edge
contrast is generated.
For a real 2D image, there usually exist many edge
(c) (d) pairs and their corresponding expansion forces can be
Fig.2. (a) A synthesized image. (b) Intensity-pair distribution of accumulated to form the net expansion forces. Figure 5
(a). (c) A real image. (d) Intensity-pair distribution of (c). shows such an example. In this example, we assume there
are three edge pairs: (1-11), (7-11) and (7-20).After the

I-914
accumulation of expansion forces for all three edge pairs, expansion forces between B and C are reduced, the noise
we have the net expansion forces as shown in Figure 5. It enhancement over the flat regions is suppressed.
is worth mentioning that, as long as the elements of the In the proposed contrast enhancement algorithm, the
net expansion forces are non-negative, the generated magnitude of expansion force has significant influence
mapping function for contrast enhancement will always be over the enhanced result. That is, the larger the magnitude
monotonically increasing. Hence, there would be no of expansion force is, the more the contrast stretch will be.
intensity-reversal problem in the enhanced image. Therefore, some un-natural or overly enhanced images
Expansion Function
may be produced. To avoid the above problems, we adjust
Expansion Force the magnitude of the net expansion forces so that the
Integration
difference between the maximum force and the minimum
0 80 175 255
0 80 175 255 force is reduced. That is, we may compress the dynamic
range of the net expansion forces. To achieve this goal,
we propose a magnitude mapping function M(X) that is
monotonically increasing, while the slope of the mapping
255
255

Output Intensity Value


Output Intensity Value

function is decreasing to zero as X increases. Based on


175
175

Normalization this mapping function, the expansion forces with large


80
80

magnitudes will be constrained to an extent so that the


processed image looks more natural. An example of the
0
0

0 80 175 255 0 80 175 255


Input Intensity Value Input Intensity Value
mapping function M( . ) is
Fig.4. Procedure for the generation of intensity mapping Y = M ( X ) = X 1/ M 0 ,
function.
where X is the expansion force, Y is the adjusted
expansion force, and M0 is a parameter that controls the
behavior of the mapping function.
Intensity value

Fig.5. Accumulation of expansion forces


A B C D

Intensity value
Generally speaking, real images always suffer certain
levels of noise. As we enhance image contrast, image Expansion Forces
noise is also enhanced. If we can distinguish the gray
levels belonging to flat regions from the gray levels Anti-expansion Forces
belonging to edge regions, we can enhance edge regions
but not flat regions. Figure 6 illustrates such an example. Net Expansion Forces

In Figure 6, the red region corresponds to a strong edge


pair while the blue region corresponds to small noise Fig.6. Illustration of anti-expansion force for noise suppression
fluctuations in flat regions. As we stretch the contrast in contrast enhancement
between A and D, the contrast between B and C is also
stretched. Hence, the noise on flat regions will also get In summary, the procedure of the proposed contrast
enhanced. To suppress noise enhancement, we propose enhancement algorithm is described as follows.
the concept of anti-expansion force. Take Figure 6 as an 1. Scan through every pixel of the given image to
example. By taking a threshold over the intensity calculate the intensity-pair information. If the intensity
difference, we may distinguish the edge region from the difference of an intensity pair is larger than a pre-selected
smooth region. A train of expansion forces will be threshold, a corresponding train of expansion forces are
generated between A and D, while another train of anti- generated. Otherwise, a train of anti-expansion forces are
expansion forces will be generated between B and C. generated. The expansion force and anti-expansion force
After subtracting the anti-expansion forces from the are accumulated until all pixels in the image are scanned.
expansion forces, we have the net expansion forces for 2. Calculate the net expansion force based on the
contrast enhancement. Because the magnitudes of the following equation:

I-915
Net-expansion-force[k] = Dejhan and A. Somboonkaew, “Contrast Enhancement
Using Multi-peak Histogram Equalization With Brightness
Expansion-force[k]-g×Anti-expansion- forces[k]; Preserving,” IEEE Asia-Pacific Conference on Circuits and
where 0 ≤ k ≤ 255 and g is parameter that control the Systems, pp.455-458, Nov. 1998.
magnitude of anti-expansion. In this paper, g is chosen to [4] J.Y. Kim, L.S. Kim and S.H. Hwang, “An Advanced
be 0.1 empirically. If the net expansion force at k is Contrast Enhancement Using Partially Overlapped Sub-
Block Histogram Equalization,” IEEE Trans. on Circuits
negative, reset that value to zero. and Systems for Video Technology, Vol. 11, Issue 4,
3. Apply the magnitude mapping function M( . ) over pp.475-484, Apr. 2001.
Net-expansion-force[k] to adjust the magnitude of the net [5] T.K. Kim, J.K. Paik and B.S. Kang, “Contrast
expansion force. Enhancement System Using Spatially Adaptive Histogram
Equalization with Temporal Filtering,” IEEE Transactions
4. Integrate the net expansion forces to get the on Consumer Electronics, Vol. 44, Issue 1, pp.82-87, Feb.
expansion function. This expansion function is then 1998.
normalized to fit into the range of 0~255. [6] S. Sakaue, A. Tamura, M. Nakayama, and S. Maruno,
5. Finally, the intensity mapping function for contrast “Dynamic Range expansion of video cameras by adaptive
enhancement is obtained by calculating the weighted sum gamma processing”, Proc. on ICCE, pp.118-119, 1995.
of the original mapping function (slope = 1) and the
normalized expansion function. That is,
Intensity mapping function=
k×(Normalized Expansion Function)
+ (1-k)×(Original Mapping Function)
Here, k is the combination factor with 0 ≤ k ≤ 1.
(a) (b)
Finally, we use the intensity mapping function to
adjust the intensity of the image for contrast enhancement.

3. EXPERIMENTAL RESULTS
In this section, we present some simulation results and do
the comparison with the enhancement results of HE and
AHE. In Figure 7 and 8, we can find that, with different (c) (d)
parameter settings, the proposed algorithm may provide
flexible and more natural results than HE and AHE.
Figure 8(a) shows an image polluted by Gaussian
noise. After HE and AHE, image noise is apparently
enhanced, as shown in Figure 8(b) and 8(c). However,
with the proposed approach, even when k is set to be 1,
(e) (f)
we may get reliable contrast enhancement without overly Fig.7. (a) Original image. (b) Image enhanced by HE. (c)
enhancing image noise. Image enhanced by AHE. (d) ~ (f) Images enhanced by the
proposed method with M0 = 2, g=0.1, and k=0.4, 0.6, and
4. CONCLUSION 0.8, respectively.
In this paper, we propose a new approach for contrast
enhancement based on intensity-pair distribution. After
distinguishing edge regions from flat regions, expansion
forces and anti-expansion forces are generated
accordingly. Moreover, to provide a natural-looking
processing result, a magnitude mapping function is
proposed to adjust the dynamic range of the net expansion (a) (b)
forces. Experimental results do demonstrate the
superiority of this approach.

5. REFERENCES
[1] R.C. Gonzalez and R. E. Woods, Digital image processing,
Addison-Wesley, 2002.
[2] Y.T. Kim, “Contrast Enhancement Using Brightness
Preserving Bi-Histogram Equalization,” IEEE Transactions (c) (d)
on Consumer Electronics, Vol. 43, No. 1, pp.1-8, Feb. Fig.8. (a) Original image with Gaussian noise. (b) Image
1997. enhanced by HE. (c) Image enhanced by AHE. (d) Image
[3] K. Wongsritong, K. Kittayaruasiriwat, F. Cheevasuvit, K. enhanced by the proposed method. ( M0, g, k) = (2, 0.1, 1).

I-916

Você também pode gostar