You are on page 1of 13

This article was downloaded by: [Selcuk Universitesi]

On: 16 January 2015, At: 04:46


Publisher: Taylor & Francis
Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House,
37-41 Mortimer Street, London W1T 3JH, UK

Journal of Modern Optics


Publication details, including instructions for authors and subscription information:
http://www.tandfonline.com/loi/tmop20

Image contrast enhancement with brightness


preservation using an optimal gamma correction and
weighted sum approach
a a a a a ad b
G. Jiang , C.Y. Wong , S.C.F. Lin , M.A. Rahman , T.R. Ren , Ngaiming Kwok , Haiyan Shi ,
c d
Ying-Hao Yu & Tonghai Wu
a
School of Mechanical and Manufacturing Engineering, The University of New South Wales,
Sydney, Australia.
b
School of Computer Science and Technology, Shaoxing University, Shaoxing, China.
c
Department of Electrical Engineering, National Chung Cheng University, Min-Hsiung
Township, Taiwan.
Click for updates d
Key Laboratory of Modern Design and Rotor Bearing System of Ministry, Xi’an Jiaotong
University, Xi’an, China.
Published online: 12 Jan 2015.

To cite this article: G. Jiang, C.Y. Wong, S.C.F. Lin, M.A. Rahman, T.R. Ren, Ngaiming Kwok, Haiyan Shi, Ying-Hao Yu &
Tonghai Wu (2015): Image contrast enhancement with brightness preservation using an optimal gamma correction and
weighted sum approach, Journal of Modern Optics, DOI: 10.1080/09500340.2014.991358

To link to this article: http://dx.doi.org/10.1080/09500340.2014.991358

PLEASE SCROLL DOWN FOR ARTICLE

Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) contained
in the publications on our platform. However, Taylor & Francis, our agents, and our licensors make no
representations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of the
Content. Any opinions and views expressed in this publication are the opinions and views of the authors, and
are not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon and
should be independently verified with primary sources of information. Taylor and Francis shall not be liable for
any losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoever
or howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use of
the Content.

This article may be used for research, teaching, and private study purposes. Any substantial or systematic
reproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in any
form to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http://
www.tandfonline.com/page/terms-and-conditions
Journal of Modern Optics, 2015
http://dx.doi.org/10.1080/09500340.2014.991358

Image contrast enhancement with brightness preservation using an optimal gamma correction
and weighted sum approach
G. Jianga , C.Y. Wonga , S.C.F. Lina , M.A. Rahmana , T.R. Rena , Ngaiming Kwokad∗ , Haiyan Shib ,
Ying-Hao Yuc and Tonghai Wud
a School of Mechanical and Manufacturing Engineering, The University of New South Wales, Sydney, Australia; b School of Computer
Science and Technology, Shaoxing University, Shaoxing, China; c Department of Electrical Engineering, National Chung Cheng
University, Min-Hsiung Township, Taiwan; d Key Laboratory of Modern Design and Rotor Bearing System of Ministry, Xi’an Jiaotong
University, Xi’an, China
(Received 8 October 2014; accepted 17 November 2014)

The enhancement of image contrast and preservation of image brightness are two important but conflicting objectives in
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

image restoration. Previous attempts based on linear histogram equalization had achieved contrast enhancement, but exact
preservation of brightness was not accomplished. A new perspective is taken here to provide balanced performance of
contrast enhancement and brightness preservation simultaneously by casting the quest of such solution to an optimization
problem. Specifically, the non-linear gamma correction method is adopted to enhance the contrast, while a weighted sum
approach is employed for brightness preservation. In addition, the efficient golden search algorithm is exploited to
determine the required optimal parameters to produce the enhanced images. Experiments are conducted on natural colour
images captured under various indoor, outdoor and illumination conditions. Results have shown that the proposed method
outperforms currently available methods in contrast to enhancement and brightness preservation.
Keywords: image contrast enhancement; gamma correction; weighted sum averaging; brightness preservation

1. Introduction for a true representation of the objects of interest and their


Since the rapid advancement of electronic imaging devices, environment, the preservation of the brightness is of equal
digital images had become one of the major medium in importance [11].
information exchange. On the other hand, images are also There are a number of possible approaches for the con-
widely used in many engineering applications where a pas- trast enhancement of images, which are either aimed at a
sive and non-contact perception of the working environment generic application or designed for a specific purpose. For
is needed. In order to realize the benefits available from the instance, colour correction and contrast enhancement were
applications of imaging technology, computer-based image considered simultaneously to produce a high-quality image
processing techniques are indispensable assets [1,2]. [12]. A popular choice of image enhancement technique
Application examples of imaging can be found in many is the histogram equalization (HE) method which is de-
areas. For example, remote sensing images are captured signed to reallocate pixel intensity levels towards a uniform
and analysed for land utilization [3,4]. In the health and distribution such that maximum scene information can be
medical fields, images can be used for illness diagnosis restored [13].
[5,6]. In industries, images can be used to monitor ma- For the class of HE-based contrast enhancement meth-
chine operation conditions by inspecting the wear particle ods, they can be broadly categorized as global and local
characteristics [7]. Images are also attractive candidates in approaches. The classification depends on whether the en-
human–computer interaction processes where user gestures hancement process is initiated from or applied to the whole
are tracked and interpreted [8]. Furthermore, in electronic image or individual regions of interest [14,15]. Although
devices, image processing has become a mandatory com- both classes of approaches can produce satisfactory results
ponent of a high-performance product [9]. according to their design objectives, the global approach is
In the context of obtaining a good-quality image for use considered simpler in the implementation.
in these applications, one of the fundamental requirements For the preservation of brightness between the input and
is to have an image of high contrast to convey the scene enhanced images, early works had focused on the use of
information as much as possible [10]. At the meantime, HE techniques for contrast enhancement while making

∗ Corresponding author. Email: nmkwok@unsw.edu.au

© 2015 Taylor & Francis


2 G. Jiang et al.

modifications to cater for minimum brightness error. A pop- imposes a non-linear manipulation of the image intensity
ular method separated the image into two sub-images and while outperforms histogram equalization with regard to its
then performed HE on each sub-image independently. The ability to steer the mean brightness of the processed image
separation threshold was chosen as the mean brightness [16] to a desired value. In the following, some backgrounds and
or the median brightness [17]. However, due to the design related work are briefly reviewed.
limitations, exact brightness preservation was not accom-
plished. Refinements on the image separation concept were
later made where the histogram was modified before con- 2.1. Contrast enhancement
ducting the HE process [18,19]. In these works, the peaks in
the histogram were clipped according to either the mean or Contrast enhancement using the histogram equalization
the median of individual sub-images. Although additional strategy is a class of global enhancement methods [1]. Firstly,
control over brightness manipulation was presented, the the statistics of the input image brightness Iin are collected
algorithms were not designed for optimal settings. in the form of a histogram. It is then normalized to give
Another class of approaches integrates the above two the probability density function, and a cumulative density
strategies aiming at providing a better performance with re- function is further generated. Finally, an output image of
spect to the goals in contrast to enhancement and brightness enhanced contrast is obtained from
preservation. For instance, in the work reported in [20], the Ien (i) ← (L − 1) × cd f (i), (1)
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

sub-images were separated using the median brightness, and


the histograms were clipped using the corresponding mean where (L − 1) is the maximum brightness and cd f (i) is
values of the sub-images. On the other hand, the minimum the cumulative density function corresponding to the ith
value among the original histogram element, median and intensity level.
mean were used to clip the histogram peaks [21]. However, Based on the principle of the histogram equalization
an exact match of brightness still remains challenging with method, the mean brightness of the output image is
these methods. 
L−1
In this work, the problem of image contrast enhance- μ(Ien ) = (i × p(i)), (2)
ment and brightness preservation is considered from a new i=0
perspective. Unlike the current approaches using histogram where p(i) is the element of the probability density function
equalizations to achieve better contrast, the developed that is associated with the ith brightness level. In conven-
method denoted as the CEGAMMA employs the non-linear tional implementations, the target probability for the equal-
gamma correction principle in order to enlarge the amount ization process is a uniform distribution where p(i) = p
of achievable contrast enhancement. Furthermore, a is a constant. Hence, the mean brightness of the output
weighted sum-based adjustment is adopted to minimize the becomes μ(Ien ) = (L − 1)/2 and is independent of the
brightness error between the input and enhanced images. input image mean brightness. This outcome, however, is
Instead of applying ad hoc determined strategies and pa- considered undesirable in most cases as this would cause a
rameters, the coefficients used in the proposed method are loss in the perception of the scene.
optimized by the efficient golden section search algorithm.
By integrating these three design concepts, the algorithm is
able to produce output images with enhanced contrast and
closely maintained brightness. 2.2. Brightness preservation
The rest of the paper is organized as follows. In In order to alleviate the above-mentioned drawback of the
Section 2, the background and previous works in contrast histogram equalization scheme, a number of alternatives
enhancement with brightness preservation are reviewed. were suggested by various researches. Their goals were
The development of the proposed method is detailed in to enhance the image contrast and preserve the brightness
Section 3. Section 4 describes the Experiments, and results level of output image. Generally, attempts were made to
are evaluated. Finally, the conclusion is drawn in Section 5. modify the target histogram to some wanted profiles in-
stead of a uniform profile. The available methods can be
broadly classified into three categories. In the first class, the
2. Background input image is separated into two sub-images against the
Image contrast enhancement is the basic pre-requisite in mean brightness and each sub-image is histogram equalized
many image-based applications. Among the available meth- [16,17]. Given an input image, the mean value μ(Iin ) is
ods, linear histogram equalization has been the most popu- calculated then the two sub-images are obtained as
lar choice for its implementation simplicity and acceptable
Ilo = {Iin | Iin < μ(Iin )}, Ihi = {Iin | Iin ≥ μ(Iin )}. (3)
performance, in general. On the other hand, non-linear ap-
proaches such as gamma correction are also attractive can- Two associated cumulative distribution densities, cd flo (i)
didates for better performance. Gamma correction method and cd f hi (i), are further calculated. Then each sub-image
Journal of Modern Optics 3

is equalized giving distribution may not have a closed-form representation, the


matching of brightness between the input and output images
Ien,lo (i) ← μ(Iin ) × cd flo (i), Ien,hi (i)
would be non-trivial.
← μ(Iin ) + (L − 1 − μ(Iin )) × cd f hi (i). (4)
Finally, the output and enhanced image are obtained as the
union of the sub-images by Ien = Ien,lo ∪ Ien,hi . The mean 2.3. Motivation
brightness is
It can be seen in the above review that contrast enhancement
μ(Ien ) = μ(Ien,lo ) p(lo) + μ(Ien,hi ) p(hi), (5) based on histogram equalization is a simple implementation
process. However, it is difficult to make use of this proce-
where p(lo) and p(hi) are the normalized number of pixels dure to maintain the enhanced image brightness. Although
in the low- and high-brightness sub-image, respectively. variations based on the idea of histogram equalization to a
When the sub-images are both equalized to a uniform target uniform distribution had been made, the outcomes can still
distribution, their mean brightness is be further improved.
μ(Ien,lo ) = μ(Iin )/2, μ(Ien,hi ) The difficulties in maintaining the output image mean
= μ(Iin ) + (L − 1 − μ(Iin ))/2. (6) brightness largely rest on the fact that histogram equaliza-
tion is not able to steer the output brightness to a wider
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

Clearly, the output image brightness depends on the content range. On the other hand, non-linear manipulations on the
of the input image but the division into sub-images is not image brightness could well be employed to steer the mean
generally possible to provide an exact match of brightness brightness to a desired value while enhancing the contrast
between the input and output images. [1].
Consider the special case that p(lo) = p(hi) = 1/2, Considering that the input image intensities are normal-
the dividing threshold becomes the median of the image ized in [0 1] and risen to power γ ∈ [0 ∞]. Then we have,
brightness [17]. The output mean brightness is as example, cases,
μ(Ien ) = (2μ(Iin ) + L − 1)/4, ∞
(7) Ien,0 = Iin
0
= 1, Ien,1 = Iin
1
= Iin , Ien,∞ = Iin ≈ 0.
which only holds when μ(Iin ) = (L − 1)/2. (10)
The other class of methods modify the histogram by If the parameter γ can be properly determined, then each
clipping the peaks to some chosen threshold in order to enhanced pixel brightness can be manipulated to desired
steer the output image brightness to match that of the input values and contribute to maintaining to overall brightness.
[18,19]. The essence of these methods rests on the modi- For instance, when γ = 0, then all pixel brightness are
fication of the target histogram to be used in equalization. changed to unity, hence, the mean output image brightness
When the target histogram is no more a uniform distribution, is also unity. When γ = 1, there would be no bright-
the mean brightness can be tailored. The reported works, ness change. If γ = ∞, then except when Iin = 1, all
however, still adopt the sub-image division approach. brightness are steered to zero and mean image brightness
Let the image be divided into two sub-images and their also tends to zero. Further developments on this idea are
corresponding histograms are constructed as formulated in the proposed method presented below.

h(lo) = {n(i) | 0 < i < μ(Iin )},


h(hi) = {n(i) | μ(Iin ) ≥ i < L}, (8) 3. Proposed approach
where n(i) is the number of pixels having the ith brightness. In the proposed approach, the objective is to increase the
Two clipping thresholds are calculated to modify the his- image contrast and to keep the mean brightness of the en-
tograms. The thresholds lo and hi adopted could be the hanced image close to the input image. In most of the
mean or median of the sub-histograms, then the modified reported works, attempts had been made using the linear
histograms become histogram equalization strategy. However, it was shown
 that an exact match between the input and output mean
h(lo), h(lo) < (lo)
h(lo) ← , brightness is a very challenging task due to the inherent limit
(lo), otherwise.
 of equalization against a predefined intensity distribution.
h(hi), h(hi) < (hi)
h(hi) ← (9) On the other hand, the objectives are contradicting where
(hi), otherwise. the match of brightness has to be compromised with the
These two modified histograms are then used in the calcu- increase in image contrast. The dual problem is tackled from
lation of two cumulative distribution functions as targets in a new perspective, here, where linear histogram equaliza-
the histogram equalization process for the sub-images. The tion is replaced by the non-linear gamma correction scheme
output is again obtained from their union. The output image and the choice of algorithm parameters are treated as an
brightness is then given by Equation (2). Since the modified optimization problem.
4 G. Jiang et al.

3.1. System description is carried out using the efficient golden section search for its
Asystem block diagram for contrast enhancement and bright- implementation simplicity [22]. When an optimal parameter
ness preservation is depicted in Figure 1. Given a colour set is obtained, the interim image is reconverted to RGB
image in the red–green–blue (RGB) space, from HSI as the output for display or for further processing.

I (u, v) = {R(u, v), G(u, v), B(u, v)}, (11)


3.2. Contrast enhancement with brightness preservation
where (u, v) is the pixel coordinate u = 1, . . . , U , v =
1, . . . , V and (U, V ) is the image size in width-by-height. The principle of contrast enhancement is based on widen-
For implementation convenience, the signals are often nor- ing the input image intensities to occupy all the permitted
malized in [0 1] with 256 intervals matching the common intensity range. One of the possible strategies is to com-
8-bit resolution. Each colour channel magnitudes are firstly press the image intensity towards the dark level and si-
stretched across the permitted ranges, for example, the red multaneously expand the intensity towards the bright level.
colour channel magnitude is stretched as The contrast-enhanced image is obtained from the weighted
sum of the two interim-compressed and interim-expanded
R(u, v) − min{R}
R(u, v) ← , (12) images. That is
max{R} − min{R}
Iˆen = α Icp + (1 − α)Iex , α ∈ [0 1], (13)
where the minimum and maximum values are obtained
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

over all pixels in the image. The green and blue channels where Icp is the compressed image and Iex is the expanded
are also stretched in the same way. Figure 2(a) shows the image. The weighting factor α is adopted to adjust the
histogram of the input image brightness, and the stretched resultant image mean brightness. The compressed interim
histogram is shown in Figure 2(b). It is noticeable that image is obtained from
brightness has covered the permissible magnitude range. γ
Icp = Iin , γ > 1, (14)
This process enriches the image colour content and serves
as pre-processing for contrast enhancement. while the expanded interim image is given by
After magnitude stretching, all colour signals are con-
Iex = 1 − (1 − Iin )γ . (15)
verted to the Hue–saturation–intensity (HSI) space. The
I-signal representing the intensity or brightness is processed By limiting the value of α in the range [0 1], it can be
in the system. The extracted I-signal Iin is fed simulta- assured that the magnitudes of the enhanced pixels are con-
neously into a compressor and an expander, both adopt- fined to the permissible bounds. In the extreme cases, when
ing the gamma correction approach with the factor γ , α = 0, the compressed interim image has no contribution
giving interim outputs Icp and Iex , respectively. An ad- to the result. On the other hand, when α = 1, the output
ditional interim-enhanced image Iˆen is derived from the does not contain any contribution from the expansion. The
compressed and expanded images using a weighting factor exponential power factor determines the degree of com-
α. This newly obtained image is tested for an objective pression or expansion on the pixel intensities. When the
function composed of maximum entropy and a penalty term pixel intensities are normalized to unity as the maximum
depending on the brightness error between the input and the value, the gamma-corrected pixel magnitude is reduced for
interim-enhanced image. The governing factors, γ and α are all γ > 1, thus, providing compression towards the dark
optimized for a highest objective function. The optimization regions. On the contrary, if γ < 1, pixel magnitudes are

Figure 1. System block diagram for contrast enhancement with brightness preservation.
Journal of Modern Optics 5

Input Stretched
(a) 4500 (b) 4500
4000 4000
3500 3500
No. of pixels

No. of pixels
3000 3000
2500 2500
2000 2000
1500 1500
1000 1000
500 500
0 0
0 50 100 150 200 250 0 50 100 150 200 250
Intensity Intensity

Compressed Expanded
(c) 4500 (d) 4500
4000 4000
3500 3500
No. of pixels

No. of pixels
3000 3000
2500 2500
2000 2000
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

1500 1500
1000 1000
500 500
0 0
0 50 100 150 200 250 0 50 100 150 200 250
Intensity Intensity

Weighted

(e) 4500
4000
3500
3000
No. of pixels

2500
2000
1500
1000
500
0
0 50 100 150 200 250
Intensity

Figure 2. Plots of histograms in different processing stages; (a) input; (b) stretched; (c) compressed; (d) expanded; and (e) weighted. (The
colour version of this figure is included in the online version of the journal.)

increased. However, in order to use only one parameter for In the compress–expand process the same amount of non-
both compression and expansion, the latter is obtained from linear adjustment is applied to obtain two interim enhance-
inverting the pixel magnitudes before rising to power γ and ments, referring to Equations (14) and (15). This strategy
reinverted to give the desired result. ensures that equal modification is applied to both of the
The brightness distributions of the manipulated image interim images in order to cover a widened region of the
signals are shown in Figure 2(c)–(e). In Figure 2(c), it can be permitted intensity range. In particular, notice that the ex-
seen that the peaks of the histogram had shifted to the lower panded interim image is first inverted, by which it is treated
end of the brightness spectrum as a result of magnitude as the compression such that the same gamma factor can be
compression. On the other hand, a shift of the peaks to the applied.
higher end can be seen in Figure 2(d) denoting an image of This secondary interim image Iˆen , from Equation (13),
higher overall brightness. The histogram of weighted sum of is checked for maximum contrast, measured by the image
image brightness is illustrated in Figure 2(e). It is observed entropy, and penalized by the brightness error between the
that the weighted combination of dark and bright images is input and itself. In order to obtain the best performance with
able to produce an image of higher contrast whose mean regard to the dual objectives of contrast enhancement and
brightness can be steered to a given value by adjusting the brightness preservation, the determination of the parameters
gamma correction and weighted sum values. is undertaken as an optimization problem described below.
6 G. Jiang et al.

3.3. Parameter optimization Algorithm 2 Optimization of gamma correction parameter


From Equations (13) to (15), it can be seen that the gamma γ
factor and the weighting factor both play crucial roles in 1: Input: input image Iin mean brightness μ(Iin ), weighting
producing the enhanced image. To this end, their values parameter α
2: Output: objective function J , interim enhanced image Iˆen
have to be carefully determined. In Figure 1, the param-
3: set gamma correction parameter γ1 , γ√ 2 , range r = γ2 − γ1
eter optimization process is represented in a double loop 4: set golden section parameter ρ = ( (5) − 1)/2 = 0.618,
structure. The inner loop is responsible for choosin the tolerance τ = r/100
weighting factor α. When an optimal α is determined, the 5: calculate objective functions and interim images using
outer loop which searches for the optimal gamma factor γ Algorithm 3;
is invoked. After the parameters converge to the optimal so- 6: [J1 , Iˆen,1 ] = g(Iin , μ(Iin ), γ1 , α), [J2 , Iˆen,2 ] =
g(Iin , μ(Iin ), γ2 , α)
lution, switch SW toggles and an enhanced image is passed 7: while r > τ do
through to the subsequent functional blocks for colour space 8: if J1 > J2 then
conversion to the original RGB format. 9: set γ2 ← γ1 + r × ρ
The search carried out by the golden section algorithm 10: calculate objective function [J2 , Iˆen,2 ] =
employed the objective function, given by g(Iin , μ(Iin ), γ2 , α)
11: else
  set γ1 ← γ1 + r × (1 − ρ)
δ 12:
J =H× 1− , δ = |μ( Iˆen ) − μ(Iin )| (16) calculate objective function [J1 , Iˆen,1 ] =
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

13:
μ(Iin ) g(Iin , μ(Iin ), γ1 , α)
14: end if
where μ( Iˆen ) is the mean brightness of the interim-enhanced 15: update r = γ2 − γ1
images, μ(Iin ) is the mean brightness of the input image. If 16: end while
there is no brightness error, the image entropy H is restored 17: return objective function J = (J1 + J2 )/2, interim
to its original value. On the contrary, when brightness error enhanced image Iˆen = ( Iˆen,1 + Ien,2 )/2
exists, the entropy is reduced as a penalty. The proposed
contrast enhancement and brightness preservation process
are summarized in the following algorithms. Algorithm 3 is the core process which performs the image
Algorithm 1 is the outer loop responsible for determining enhancement process and produces the objective function. It
the optimal weighting parameter α. It callsAlgorithm 2 in an accepts parameters γ and α from Algorithm 2 and produces
attempt to obtain the optimal gamma correction parameter the interim-enhanced image. The objective function is also
γ . Before entering the inner loop, the mean brightness value calculated in this sub-routine.
of the input image is first calculated as a reference to obtain
the brightness error.
Algorithm 3 Image enhancement
1: Input: input image Iin , mean brightness μ(Iin ), gamma
Algorithm 1 Optimization of weighting parameter α correction parameter γ , weighting parameter α
1: Input: input image Iin 2: Output: objective function J , interim enhanced image Iˆen
γ
2: Output: enhanced image Ien 3: calculate compressed image Icp = Iin
3: calculate input image mean brightness μ(Iin ) 4: calculate expanded image Iex = 1 − (1 − Iin )γ
4: set weighting parameter α1 , α2 , range√r = α2 − α1 5: calculate weighted image Iˆen = α Icp + (1 − α)Iex
5: set golden section parameter ρ = ( (5) − 1)/2 = 0.618, 6: calculate absolute brightness error δ = μ( Iˆen ) − μ(I
tolerance τ = r/100  in )
6: calculate objective functions and interim images using 7: calculate objective function J = H × 1 − μ(Iδ )
in
Algorithm 2; 8: return objective function J , interim enhanced image Iˆen
7: [J1 , Iˆen,1 ] = f(Iin , μ(Iin ), α1 ), [J2 , Iˆen,2 ] =
f(Iin , μ(Iin ), α2 )
8: while r > τ do
9: if J1 > J2 then The golden section search method is basically an iterative
10: set α2 ← α1 + r × ρ process. An initial search region is defined according to
11: calculate objective function [J2 , Iˆen,2 ] = the problem domain, while the search space can be ob-
f(Iin , μ(Iin ), α2 ) tained by carrying out pilot trials. Furthermore, a termina-
12: else
tion condition is defined according to the required solution
13: set α1 ← α1 + r × (1 − ρ)
14: calculate objective function [J1 , Iˆen,1 ] =
precision. In this work, pilot tests had revealed that the
f(Iin , μ(Iin ), α1 ) gamma factor would fall within [1 4], hence, this is the initial
15: end if search region. The termination condition is set to r/100
16: update r = α2 − α1 corresponding to the required solution precision. Higher
17: end while accuracy can be obtained by compromising efficiency with
18: return enhanced image Ien = ( Iˆen,1 + Iˆen,2 )/2
extended iterations.
Journal of Modern Optics 7

4. Experiments this value tends to zero, good brightness preservation is


Experiments were conducted using 200 colour images of indicated [16].
various contents which were taken from different capturing
environments. Images were delivered from the camera in
4.2.2. Entropy
RGB colour space and in the JPEG format. The size of these
images are 300×400 width-by-height and the enhancement

L−1
algorithm was run in the Matlab platform. Result statistics H=− p(i) log p(i), (18)
were collected and presented in box plots. The optimized i=0
parameters are given in plots of their numerical value dis-
where p(i) is the probability that a pixel has the bright-
tributions. The performance of the proposed method is as-
ness i. A high entropy value denotes a desirable high infor-
sessed both qualitatively and quantitatively. The results are
mation content carried in the image [1,9].
compared against representative methods including the con-
ventional histogram equalization to a uniform distribution
(UNFHE) [1], mean separated bi-histogram equalization 4.2.3. Contrast
(BBHE) [16], dualistic sub-image histogram equalization
(DSIHE) [17], bi-histogram equalization with plateau limit ⎛ ⎞2
1  1 
(BHEPL) [18], bi-histogram equalization with plateau limit C= 2
Ien (u, v)+ ⎝ Ien (u, v)⎠ , (19)
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

on sub-image medians (BHEPLD) [19], adaptive image N N


(u,v)∈ (u,v)∈
enhancement based on bi-histogram equalization with a
clipping limit (AIEBHE) [21], median–mean-based sub- where  is the image spatial domain consisting of N pixels.
image-clipped histogram equalization (MMSICHE) [20] A large value represents a high contrast image [21].
and smoothed histogram equalization (SMHEQ) [23].
4.2.4. Gradient
4.1. Test images
1 
The 200 test images collected by the authors include both G= ∇u2 (u, v) + ∇v2 (u, v), (20)
N
indoor and outdoor natural scenes which were captured (u,v)∈
under different illumination and environmental conditions. where ∇u (u, v) = Ien (u, v) − Ien (u + 1, v), ∇v (u, v) =
Figure 3 shows examples of the test samples of various Ien (u, v) − Ien (u, v + 1) are the gradients along the hori-
feature contents. Images in Figure 3(a) were taken in over- zontal and vertical directions across the image [1]. A high
cast days and objects are not clear to a human viewer. In value quantifies a desirable sharp image.
Figure 3(b), the images were captured in an environment
containing haze or fog, and objects are hardly identifiable.
Images shown in Figure 3(c) were taken under normal 4.3. Qualitative evaluation
weather condition but objects were covered by shadows. Qualitative comparison of different contrast enhancement
Figure 3(d) illustrates test image of indoor scenes. Due methods is presented in this section. Two input images with
to illumination colour casting, objects are difficult to be degraded appearance are chosen here to demonstrate the
distinguished. These test images were chosen to illustrate performance difference among various image contrast en-
the source of difficulties that the proposed algorithm is able hancement methods. The performance differences are
to overcome. mainly evaluated by subjective viewer perception of how
well brightness is being preserved, how much contrast is
enhanced in the scene, and how sharp every edge around
4.2. Assessment criteria
objects appears.
The most prominent assessment criteria adopted when com- The input image in Figure 4, as we can see, is affected by
paring performance among available methods are the foggy shooting environment. Images from 4(b)–(j) present
brightness error and the entropy. Other common metrics for different enhanced results using various available methods
image-quality measures in terms of contrast and sharpness mentioned above. Image 4(b)–(d) using UNFHE, BBHE
are also used. and DSIHE, respectively, shows greater contrast over the
rest of the images.
4.2.1. Brightness error On the other hand, these images also greatly distorted
the input image brightness level, leaving unrealistic presen-
tations of the original scene. These brightness distortions
E = μ(Ien ) − μ(Iin ), (17) stem from the linear mapping of brightness level when
where μ(Ien ) is the mean brightness of the enhanced image, trying to achieve contrast enhancement in these methods.
μ(Iin ) is the mean brightness of the input image. When Images using BHEPL, BHEPLD, AIEBHE and MMSICHE
8 G. Jiang et al.
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

(a) (b) (c) (d)

Figure 3. Example test images: (a) outdoor – insufficient illumination, (b) outdoor – poor environment condition, (c) outdoor – non-ideal
condition and (d) indoor – colour cast. (The colour version of this figure is included in the online version of the journal.)

shown in images 4(e)–(h), respectively, have little success and the edge around objects are also sharpened with the
enhancing the contrast of the input image. This is primarily boundary of each object clearly shown.
as a consequence of the clipping operation these methods In Figure 5, another hazy input image is presented. Im-
employed to preserve the mean brightness level of the input ages from 5(b)–(d) using UNFHE, BBHE and DSIHE suffer
image. from the same brightness distortion as found in the previous
Image 4(i) using SMHEG method shows an acceptable test image. Image 5(e) and (f) using BHEPL and BHEPLD
balance between brightness preservation and contrast en- has only marginal contrast improvement over the input im-
hancement, while in certain areas such as around the tower, age while preserving brightness level well. Images in 5(h)–
degradation by a fog-like effect is observed. Image 4(j), (j) with AIEBHE, MMSICHE, SMHEQ and CEGAMMA,
where the proposed CEGAMMA is used, gives a clean respectively, show comparative contrast-enhanced result
and neutral image without much distortion of the input with Image (j) having least brightness deviation from the
brightness level. Furthermore, image contrast is enhanced original input image.
with details of image observable in all the areas of the scene,
Journal of Modern Optics 9

(a)

(b) (c) (d)


Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

(e) (f) (g)

(h) (i) (j)

Figure 4. Test results – image 1: (a) input; (b) UNFHE; (c) BBHE; (d) DSIHE; (e) BHEPL; (f) BHEPLD; (g) AIEBHE; (h) MMSICHE;
(i) SMHEQ; (j) CEGAMMA. (The colour version of this figure is included in the online version of the journal.)

To sum up, UNFHE, BBHE and DSHIHE are most prone 4.4. Quantitative evaluation
to brightness distortion due to the way they map input bright- On top of objective viewing, metrics including brightness
ness level linearly according to a pre-set distribution. error, entropy, contrast and gradient are also examined for
BHEPL, BHEPLD, AIEBHE and MMSICHE are better at quantitative comparison of performance among the
preserving image brightness level by posing clipping limits described methods. With 200 colour images evaluated in
around appropriate brightness levels. However, the contrast this experiment, box plots of above-mentioned metrics are
enhancement performance of these methods is not ensured selected for clear illustration of the performance difference.
in all images. Both SMHEQ and CEGAMMAshow good re- The box plot of brightness error in Figure 6(a) indicates that
sults with balancing performance of contrast enhancement the proposed CEGMMA method is preferable over other
and brightness preservation in the example test images by approaches. The CEGAMMA performs better in preventing
utilizing different enhancement philosophies. the generation of viewing artefacts and scene distortions in
the resultant images.
10 G. Jiang et al.

(a)
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

(b) (c) (d)

(e) (f) (g)

(h) (i) (j)

Figure 5. Test results – image 2: (a) input ; (b) UNFHE; (c) BBHE; (d) DSIHE; (e) BHEPL; (f) BHEPLD; (g) AIEBHE; (h) MMSICHE;
(i) SMHEQ; (j) CEGAMMA. (The colour version of this figure is included in the online version of the journal.)

It also can be clearly seen in the entropy box plot, In the aspect of gradient performance as shown in
Figure 6(b) that CEGAMMA method leads other methods Figure 6(d), UNFHE, BBHE and DSIHE give best results
in maximizing entropy, which is desirable to convey more with regards to the mean gradient values. However, this
scene information. These results demonstrate an obvious result is predictable as these three methods tend to cre-
advantage of the proposed method to formulate parameters ate large amount of discontinuities in the histogram with
quest as an optimization problem. their linear mapping of brightness value. In spite of having
In the contrast box plot, Figure 6(c), the performance sharper edges around objects in the scene, these methods
of CEGAMMA is slightly worse than UNFHE, DSHIHE also create a lot of viewing discomfort and artefacts. The
and SMHEQ, while better than methods such as BHEPL, proposed CEGAMMA method performs similar to the rest
BHEPLD, AIEBHE and MMSICHE that are based on of discussed methods in this comparison with a mean gra-
setting limits around wanted brightness level to ensure dient value of 0.032.
brightness preservation. The proposed method’s ability on From the above analysis, the proposed CEGAMMA
enhancing contrast is deemed well with its above-average method demonstrates the best performance in brightness
performance. retention and entropy maximization, which is highly
Journal of Modern Optics 11
μ= 0.000 0.022 −0.010 −0.004 −0.029 −0.027 −0.045 −0.010 0.028 −0.000 μ= 7.341 7.183 7.199 7.201 7.120 7.120 7.039 7.127 7.175 7.481
(a) (b)
0.2
7.8
0.15
7.6
0.1 7.4

0.05 7.2
Brightness

Entropy
0
6.8
−0.05
6.6
−0.1
6.4
−0.15 6.2

−0.2 6
5.8
−0.25

A
E

E
t

EQ
E

LD
E

A
E

EQ
L

LD

pu
pu

BH
FH

CH
BH

EP
FH

CH
EP

M
M

In
In

BB

SI

H
EP
BB

SI

H
EP

M
M

BH
BH

N
N

IE

SI
IE

SI

SM
SM

D
D

A
BH
A
BH

U
U

M
M

A
A

G
G

M
M

CE
CE
(c) μ= 0.520 0.573 0.518 0.531 0.461 0.466 0.437 0.493 0.578 0.530
(d) μ= 0.030 0.042 0.041 0.041 0.031 0.031 0.031 0.033 0.036 0.032

0.11
1.2
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

0.1

0.09
1
0.08

0.07
0.8 Gradient
Contrast

0.06

0.6 0.05

0.04

0.4 0.03

0.02
0.2 0.01
t

t
E

A
E

E
EQ

EQ
L

LD

LD
pu

pu
H

BH

BH
FH

H
CH

FH

CH
EP

EP
M

M
In

In
BB

SI

BB

SI
H

H
EP

EP
M

M
BH

BH
N

N
IE

IE
SI

SI
SM

SM
D

D
A

A
BH

BH
U

U
M

M
A

A
G

G
M

M
CE

CE
Figure 6. Statistics of test results in box plots: (a) brightness error; (b) entropy; (c) contrast; (d) gradient. (The colour version of this figure
is included in the online version of the journal.)

beneficial in contrast enhancement techniques to avoid scene values, is 0.374. The shift of the mode from the mean value
artefacts and to convey maximum scene information. Fur- may be attributed to the fact that most images require com-
thermore, comparable performance against other referred pression or modification to lower intensities because of the
methods in contrast and gradient is also observed in the box characteristics of the image content. By inspecting the test
plots. Overall, CEGAMMA achieves superior image en- images shown in Figures 4 and 5, it can be seen that images
hancement and brightness preservation performance against captured under foggy or hazy environment tend to cast
compared methods. the scene into white or towards the high-intensity region.
Thus, the proposed algorithm modifies the images toward
the darker intensities as a result of the enhancement process.
4.5. Parameter settings A plot of the distribution of the gamma correction factor
Based on the 200 test images, statistics of the obtained is given in Figure 7. The mean value is 1.365 and the mode
weighting factor α and the gamma correction factor γ are is 1.075 with a second peak located at 1.400. This factor
shown as distributions in Figure 7(a) and (b). For the weight- is responsible for the degree of enhancement produced as
ing factor, Figure 7(a), the average value is 0.491. It can the intensity ranges were compressed or expanded to the
be conjectured that approximately equal efforts had been two ends of the intensity region. We can see that a certain
exerted in increasing image intensities to the higher amount of power law correction is needed to produce an
magnitude region as well as in decreasing the intensities enhanced image. However, this parameter depends largely
to the lower magnitude region. The net effect resulted in on the image content. If the input image has sufficient con-
expanding the intensity range, thus, covering the allowed trast, then a small gamma is needed. On the contrary, when
magnitude range uniformly and increasing the informa- the input image contrast is low, then a larger correction is
tion content. The mode or the largest number of parameter required.
12 G. Jiang et al.
μ=0.491, η=0.374 μ=1.365, η=1.075
(a) 70 (b) 35
60 30

50 25
No. of images

No. of images
40 20

30 15

20 10

10 5

0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 1.5 2 2.5 3 3.5 4
Factor α Factor γ

Figure 7. Distribution of algorithm parameters: (a) weighted-sum parameter α; (b) gamma correction parameter γ . (The colour version
of this figure is included in the online version of the journal.)
Downloaded by [Selcuk Universitesi] at 04:46 16 January 2015

5. Conclusion [6] Wang, X.; Zhang, D. Expert Syst. Appl. 2013, 40, 5854–
5866.
Anew procedure for image contrast enhancement and bright-
[7] Wu, T.; Wu, H.; Du, Y.; Kwok, N.; Peng, Z. Wear 2014, 316,
ness preservation had been presented. The proposed method 19–29.
was designed aiming at overcoming the limitations of his- [8] Su, F.; Fang, G.; Kwok, N. Shadow Removal Using
togram equalization-based approaches in providing close Background Reconstruction. In 5th International Congress
matches of input image brightness. Unlike the currently on Image and Signal Processing (CISP), 2012, Chongqing,
pp 154–158.
available techniques, this work adopted the gamma cor-
[9] Yao, Y.; Abidi, B.; Doggaz, N.; Abidi, M. Evaluation of
rection strategy together with weighted sum to derive Sharpness Measures and Search Algorithms for the Auto
high-contrast images with a significant improvement in Focusing of High-Magnification Images. In Defense and
brightness preservation. In particular, image intensity mag- Security Symposium, Orlando, FL, 2006, pp 62460G-1–
nitudes were compressed, expanded and then aggregated. 62460G-12.
[10] Tanaka, G.; Suetake, N.; Uchino, E. Opt. Rev. 2010, 17, 130–
High-performance results were accomplished by casting
138.
the problem into an optimization context where algorithmic [11] Choi, H.H.; Yun, B.J. Opt. Rev. 2011, 18, 389–393.
parameters were iteratively searched and optimally deter- [12] Kwok, N.; Shi, H.; Ha, Q.; Fang, G.; Chen, S.; Jai, X. Eng.
mined. The effectiveness of the proposed method was veri- Appl. Artif. Intell. 2013, 26, 2356–2371.
fied using a collection of a large number of images captured [13] Yoon, B.W.; Song, W.J.J. Electron. Imag. 2007, 16, 033005–
033005.
in natural scenes under various illumination and environ-
[14] Kong, N.S.P.; Ibrahim, H. Comput. Electr. Eng. 2011, 37,
ments. Results had shown that the developed algorithm 631–643.
outperformed others in terms of brightness preservation, [15] Kwok, N.; Shi, H.; Fang, G.; Ha, Q.P. Intensity-Based
information content increment as well as the reduction in Masking Gain Adaptive Unsharp for Image Contrast
viewing artefacts produced. Enhancement. In 5th International Congress on Image and
Signal Processing (CISP), 2012, Chongqing, pp 529–533.
[16] Kim, Y.T. IEEE Trans. Consum. Electron. 1997, 43(1), 1–8.
References [17] Wang, Y.; Chen, Q.; Zhang, B. IEEE Trans. Consum.
[1] Gonzalez, R.C.; Woods, R.E. Digital Image Processing, 3rd Electron. 1999, 45, 68–75.
ed.; Prentice-Hall Inc, Upper Saddle River, NJ, 2006. [18] Ooi, C.H.; Kong, N.S.P. IEEE Trans. Consum. Electron.
[2] Sun, W.; Han, L.; Guo, B.; Jia, W.; Sun, M. J. Mod. Optic 2009, 55, 2072–2080.
2014, 61, 1–12. [19] Ooi, C.H.; Isa, N.A.M. IEEE Trans. Consum. Electron. 2010,
[3] Zhang, G.; Jia, X.; Kwok, N. Super Pixel Based Remote 56, 2543–2551.
Sensing Image Classification with Histogram Descriptors [20] Singh, K.; Kapoor, R. Optik Int. J. Light Electron Opt. 2014,
on Spectral and Spatial Data. In International Geoscience 125, 4646–4651.
and Remote Sensing Symposium (IGARSS), Munich; 2012, [21] Tang, J.R.; Isa, N.A.M. Comput. Electr. Eng. 2014, 21,
pp 4335–4338. 86–103.
[4] Guo, W.; Xia, X.; Xiaofei. Expert Syst. Appl. 2014, 41, 6446– [22] Chong, E.K.P.; Zak, S.H. An Introduction to Optimization,
6458. John Wiley: Hoboken, NJ, 2013.
[5] Sundaram, M.; Ramar, K.; Arumugam, N.; Prabin, G. Appl. [23] Kwok, N.M.; Jia, X.; Wang, D.; Chen, S.Y.; Fang, G.; Ha,
Soft. Comput. 2011, 11, 5809–5816. Q.P. Comput. Electr. Eng. 2011, 37, 681–694.

You might also like