10 Chapter 4
10 Chapter 4
4.1 INTRODUCTION
Real time or captured images/videos are taken from publicly available databases and
are used for various purposes such as image classification, object detection and
tracking. These raw images are not suitable for analysis because of presence of
various types of noise, bad state of capturing devices, low illumination etc. This often
leads to numerous problems such as inability to segment images accurately, visual
illusions, poor detection of object boundaries, misclassification of images, distortion
of visual quality etc. Therefore effective and efficient pre-processing is required for
improving visual quality and enhancing contrast so that targets could be detected
accurately in videos.
The organization of chapter is as follows: next section discusses about available pre-
processing techniques for videos with major focus towards contrast stretching; section
101
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
4.3 focuses on related work on contrast enhancement is discussed under two sub-
headings of conventional and soft computing based enhancement techniques. Section
4.4 proposes new contrast enhancement approach based on water cycle algorithm.
Section 4.5 projects performance results of the proposed technique on various videos
and images. The chapter ends with conclusions and summary.
102
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
The relationship between two pixels is measured in bilateral filtering in terms of both
closeness in the domain and similarity in the range. The output of bilateral filter at
each pixel is in form of weighted average of its neighbors. The bilateral filter makes
use of both geometric closeness and photometric similarity which make it efficient in
reducing noise. Guided image filter [188], [189], [190], is an edge-preserving
smoothing filter which involves smoothing of input image by using the content of
another image called the guidance image to influence filtering process. The guidance
image can be referred as image itself, a different version of the image, or a completely
different image. The filtering operation using guidance images is much like other
filtering operation in which the statistics of a region in the guidance image are
considered while evaluating the value of output pixel. Median Filters [191] are
commonly used in various computer vision and image processing applications in
which filtering is achieved by substituting each pixel value with the median value of
the surrounding N-by-N neighborhood. Fuzzy directional filter [192] was employed to
reduce the additive impulsive noise in color videos. Fuzzy logic filters were designed
by establishing membership function and fuzzy rule base to detect noise in the
neighborhood frames. In [192], 3D fuzzy directional filter was proposed which
employed 2D fuzzy filter in t-initial frame of video. The filtering resulted from the
first stage was used in processing of the current frame of the video. At last, the current
frame was filtered using 2D filter again w.r.t. fuzzy rules based on direction
information to reduce the effect of noise. Recursive temporal LMMSE de-noising
filter[193] was put-forward to reduce noising effect in videos. It was integrated into
encoding and decoding process of video codec. The filter included spatiotemporal
adjacent homogeneous pixels which were matched with the current pixels to reduce
noise effectively. Spatio-temporal filters have been attempted in [194] for reducing
Gaussian noise in dynamic videos where temporal gaussian smoothing was combined
with fast digital path approach. The study on noise filtering reveals that overall
performance of the system significantly decreases with increase in noise. Therefore
researchers need to develop and work on image reconstruction by removing noise and
blurriness, in images to make them human perceptible.
Various applications like object detection and tracking, foreground extraction, video
surveillance, deal with videos or images that suffer from degradation in quality due to
103
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
104
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
Digital images have become core information carrier due to their explosive
development in the field of internet and rapid increase in growth of image acquisition
devices. People like to get a large amount of detailed information from images and
therefore it is very important to maintain visual quality. Images or videos are
degraded by contrast effect due to errors and problems in image acquisition devices.
Image sharpening is a very popular type of enhancement is used in numerous practical
applications with aim of utilizing and improving visual quality of images from human
visual point of view. Image contrast will be improved by image sharpening technique
by putting together scaled edge information around object boundaries in an image.
The contrast of images will be enhanced to represent fine details of the image with
reduced blurring effect after sharpening operation. This technique has become a well
known issue for various practical applications such as object detection and tracking in
videos, image segmentation, and automatic guidance in military system and medical
imaging. The sharpened image will have sharp boundaries with improved intensity
values aiding in correct classification of pixels. Work in this direction has already
flourished a lot and many well known algorithms on image sharpening methods are
readily available today. Some of image sharpening techniques[200-203] have been
referred for interested readers.
105
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
Contrast Enhancement is one of the important steps of image/ video processing that
has contributed to various fields such as computer vision, pattern recognition and
digital images processing. Contrast enhancement is process employed on images or
videos to raise dynamic gray level range. It can also act as a pre-processing step in
various video applications by redistributing intensity range of image or by modifying
histogram of an image so that they can be interpreted efficiently by humans or
machines. A number of applications like object detection and tracking, anomaly
detection are governed by amount of information that could be captured by cameras.
Although some success has been attained with invent of sophisticated cameras but
constraints imposed by weather like low illumination, fog and haze have not been still
completely overpowered. An image or video captured in bad weather is bound to have
low contrast that can attenuate performance of various computer vision tasks. Most of
image enhancement methods tend to improve contrast and highlight details by
processing individual pixel level values either locally or globally. Local enhancement
methods work on parts of image or frame whereas global methods operate on whole
image. Global contrast stretching methods have been successful in restoring contrasts
but problems like overcompensation, truncation of pixel values amounting to loss of
information tends to creep in. An efficient contrast enhancement technique should
have properties of noise tolerance, uniform enhancement, brightness preservation and
utilization of resources. It is crucial to study various properties of contrast
enhancement techniques for further utilization in numerous applications. Therefore,
various considerations such as varied illumination conditions, camera perspective,
noise, have to be made during selection of numerous contrast enhancement
characteristics different applications. The next section is devoted to discussion on
various contrast enhancement studies.
106
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
discussed in section 4.3.1. Soft computing techniques include fuzzy logic based
methods, neural network based method and evolutionary based method have also been
applied for preserving brightness and enhancing contrast of the image. Enhancement
techniques based on soft computing methods are discussed in section 4.3.2.
The conventional contrast enhancement techniques are classical techniques used for
maintaining contrast of the image. In methods like Histogram Equalization (HE),
enhancement is obtained by redistribution of pixel intensities over a dynamic range.
Histogram Equalization flattens and stretches dynamic range of an image histogram
and gives an over-all contrast improvement. Histogram Equalization has been used in
all fields like Medical, Radar, Satellite and Microstructure image processing etc and is
available in most image processing packages such as Adobe Photoshop, National
Institutes of Health Image and Lispix.
Histogram Equalization methods can be categorized into two as global and local.
Global HE methods improve quality of image by normalizing distribution of
intensities over dynamic range, using histogram of entire image. It is achieved by
manipulating intensity distribution using its cumulative distribution function (CDF) so
that resultant image may have a linear distribution of intensities. Local Histogram
Equalization (LHE) methods use histogram intensity statistics of the neighborhood
pixels of an image for equalization. These techniques usually divide the original
image into several non-overlapped sub-blocks and perform histogram equalization on
the individual sub-blocks. The resultant image is produced by merging sub-blocks
using bilinear interpolation method. The major drawback of these methods is
introduction of checkerboard effect which appears near boundaries of sub-blocks. The
enhanced image using Histogram Equalization tends to have unnatural enhancement
and intensity saturation artifacts due to the error in brightness because of mean-
shifting and tends to introduce washed-out effect in the output image. Conventional
HE is one of the mostly used contrast enhancement techniques but is not suitable in
applications where brightness preservation property is required. In the recent years,
many researchers have proposed several useful algorithms to overcome problems of
Histogram Equalization. To overcome brightness preservation problem, various
histogram equalization methods such as Mean preserving Bi-Histogram Equalization
(BBHE), equal area Dualistic Sub-Image Histogram Equalization (DSIHE), Minimum
107
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
Another common method for enhancing the contrast of images is Gamma correction.
Gamma correction with weighted distribution method was introduced by Huang et al.
[210] for efficient contrast enhancement in images. This work is an automatic
transformation approach to increase brightness of dimmed images using probability
distribution method of luminance pixels. The complexity of method was reduced by
using temporal information with respect to difference between each frame. It was also
demonstrated that proposed approach was capable of implementation in real time
environment according to time consumption analysis of work. Recently, a similar
108
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
investigation was carried out by Gupta et.al [211] in which they had applied Gamma
correction with weighted probability distribution method for contrast enhancement in
images. The proposed approach used weighting distribution function for modifying
statistical histogram and reduced generation of various adverse effects. The method
was tested on images having variation in illumination due to back light effect, light
source location, cloud cover, sunshine intensity, etc. and was shown to achieve high
Peak signal noise ratio.
Two factors namely lighting condition and structural distortion were considered by
Janga et.al [212] to improve visual quality for contrast enhancement in images. Their
work consisted of two major steps. The first step deals with estimation of lighting
condition computed using dynamic range along edges of the image. The second step
deals with contrast enhancement process adjusted by taking into consideration both
estimated lighting condition and various order of luminance levels. Compared to
state-of-art methods, the proposed approach was able to achieve better visual quality
of different images by raising various parameters such as entropy, tone-mapped image
quality index, average structural fidelity and enhancement performance measure. A
low contrast enhancement technique based on singular value decomposition was
proposed by Atta et al. [213]. In this method, a single value matrix of the equalized
image was computed using weighted sum of singular matrices of input image and its
global histogram equalization (GHE) image. It was shown that proposed approach
does not produce satisfactory results for some low contrast images. The method was
qualitatively and quantitatively evaluated against various conventional algorithms
such as global histogram equalization and local histogram equalization approaches.
Overall Brightness and Local Contrast Adaptive Enhancement algorithm was applied
by Zhou et al. [214] based on HSI color-space model. The work consisted of three
steps. The first stage of the three step method was global brightness adaptive
adjustment and the second stage deals with adaptive local contrast enhancement. The
last stage deals with color restoration process. The method yielded successful results
for color images with low illumination.
109
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
preservation, over enhancement etc. This led to use of soft computing based
techniques in the field of image/ video contrast enhancement. Several soft computing
techniques have been used for contrast enhancement in images/videos and this section
discusses some of these techniques.
Histogram Equalization has also been implemented using artificial neural network
based studies and Thomas H. Hildebrandt [215] was the first to propose and
implement a circuit for generalized histogram equalization. Few weight based
equalization methods like weighted threshold HE (WTHE) [216] had been proposed
to add adaptivity and ease of control to the enhancement process. These methods tend
to modify probability density function by suitable weights before performing
equalization and perform normalization afterwards with addition of some adjustment
factor. Weight Clustering HE (WCHE) [217] was also developed in 2008 which had
its basis on adaptive change of weights. Another Local HE based technique was
proposed by Chitwong et al. [218] that utilized efficacies of Hopfield networks. The
method uses fuzzy c-means clustering and competitive hopfield neural network for
segmentation of image while performing equalization of both components
individually. In [219], authors have presented genetic algorithm based method using
wavelet neural network for image contrast enhancement. They had applied in
complete beta transform to provide non-linear gray transform curve for global image
contrast enhancement. The method employed genetic algorithms to determine optimal
gray transform parameters and wavelet neural networks were applied for
approximation in complete beta transform. They had applied discrete stationary
wavelet transform to enhance local contrast of image. The final output resulted from
union of local enhanced image and global enhance image. The obtained results
showed that proposed approach was able to enhance contrast of image greatly and it
was also found that the method reduced noise and background blur better than state-
of-the art methods.
Fuzzy logic has also been used for various areas of digital image processing in recent
years. Fuzzy image processing approach comprises of three steps: image fuzzification,
manipulation of membership values and image defuzzificiation. The image contrast
enhancement using fuzzy logic is based on fuzzy modeling of images. Many
techniques based on fuzzy logic have been proposed for image contrast enhancement.
Debdoot et al. [220] proposed modified version of HE based on fuzzy statistics of
110
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
Nature inspired techniques have been successfully exploited using methods such as
genetic algorithm, particle swarm optimization, ant colony optimization, simulated
annealing for contrast enhancement. P. Shanmugavadivu in [224], [225] had used
concept of histogram segmentation and multi objective functions for enhancement of
images. In [224], the author optimized Bi-Histogram Equalization approach for
improving contrast of input image. The technique segmented input image histogram
into two sub histogram based on its mean and weighting constraints were applied to
111
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
Genetic algorithms have been applied for brightness preserving and enhancing
contrast of gray scale and coloured images. Munteanu et al. [228] proposed
application of transformation function to each pixel of input image. Genetic
Algorithm was used to extract parameters of transformation function. The
112
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
113
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
The first stage deals with the initialization of solution. The second stage known as
employed bee stage creates new solution from randomly chosen solutions. The third
stage i.e. onlooker stage looked for best solution and final stage i.e. scout stage
replaced inactive solution with a new generated randomly. This method was
compared with meta-heuristic algorithm such as genetic algorithm and various
conventional algorithms such as grey- level grouping, adaptive grey-level grouping
and histogram equalization for performance evaluation. Furthermore, the proposed
approach can also be implemented on color images. Hoseini et al. [234] applied
hybridization of ant colony optimization, genetic algorithms and simulated annealing
for improving contrast of images. Enhancement was achieved by applying global
intensity transformation grey scale images. The transfer function generated using ant
colony optimization was used to map the input intensities to output intensities. The
transfer function was tuned by applying local search technique known as simulated
annealing. Furthermore, Genetic algorithm was applied to control the parameters of
ant colony optimization for preserving naturalness of images. The performance of the
proposed approach was evaluated subjectively and objectively against algorithms
such as histogram equalization, fuzzy approach, linear contrast stretching etc.
Evolution based studies like genetic algorithm (GA) and particle swarm optimization
(PSO) have also been hybridized by various researchers to propose challenging
solutions for contrast enhancement of images. In order to enhance contrast of grey
scale images, problem of image enhancement has been framed as an optimization
problem by Apurva & Ashish [235] and PSO has been utilized to attain maximum
value for edge based contrast of image. The proposed method was compared with
various contrast enhancement techniques such as GA based image enhancement,
histogram equalization, and was shown to achieve better results.
The studies discussed above justify use of various soft computing based approaches
developed for contrast enhancement in images. Among these, evolutionary algorithms
are one of the mostly used techniques as it is difficult to develop a rule based or
training based system for this task. This may be attributed to the nature of problem
being targeted and associated complexities involved in the process. Driven by above
finding, this chapter proposes a modified histogram equalization approach to enhance
contrast of image by preserving colorfulness and brightness in complex images. The
method has also been extensively tested for performance evaluations.
114
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
A number of applications like object detection and tracking, anomaly detection are
governed by amount of information that could be captured by cameras. Such hazards
are not still completely overpowered and make the task of enhancing and sharpening
images or videos a challenging and an evergreen problem. Most of image
enhancement methods tend to improve contrast and highlight details by processing
individual pixel level values either locally or globally. Global contrast stretching
methods like histogram equalization(HE) have been successful in restoring contrast
but problems like overcompensation, truncation of pixel values amounting to loss of
information and other types of losses tends to creep in. Artifacts may be introduced
and images may lose its colorfulness. In order to overcome these situations, a novel
histogram equalization method inspired by principles of Water Cycle Optimization
Algorithm (WCA) has been proposed. The proposed method formulates the problem
of enhancement of contrast as optimization problem and solves it with help of water
cycle optimization method. The proposed method converts input frame to YCrCb
domain and extracts its Y channel. The Y channel of input frame is smoothened using
Gaussian low pass filter to suppress useless information. The frame is then portioned
into background and foreground sub-frames using Ostu‘s 2D thresholding principle.
The foreground and background are then subjected to suitably designed constraints
and intensity is manipulated using an improved version of histogram equalization by
preserving naturalness of frame using WCA. WCA helps to select an optimal value of
parameters based on combination of three objective functions suitably framed such
that over enhancement can be negated and colorfulness of frame could be preserved.
Color component is restored by adding CrCb channel to equalized image to mitigate
loss of colorfulness. Proposed approach works on YCbCr space and a novel multi-
objective function for evaluation of image quality is designed for preservation of color
and naturalness. Multi objective function has been utilized in water cycle optimization
algorithm to extract optimal values of parameters to suitably control enhancement.
4.4.1 Outline
Consider an input image I of size M*N with intensity in the range of [ , ],
the probability density function ( ) for any level rk is given as:
115
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
( )
( ) (4.1)
( )
( ) ∑ ( ) (4.2)
Standard histogram equalization maps an image from narrow intensity range to entire
intensity range of [ , ] using CDF using Eq. 4.3.
( ) ( ) ( ) (4.3)
Histogram equalization is a traditional contrast enhancement approach that flattens
histogram and imposes a noteworthy modification in brightness of image. HE based
techniques suffer from problem of mean shift, preservation of details, over
116
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
Thresholding divides an input image into foreground and background which can
further be equalized separately in order to improve contrast of individual regions.
Ostu‘s method [236] is one of the most commonly used approaches to automatically
segment image into two distinct classes. Ostu‘s algorithm searches for a threshold that
117
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
maximizes inter class variance between foreground and background regions defined
as weighted sum of variances of the two classes:
( ) ( ( ) ( )) ( ( ) ( )) (4.4)
∑ (4.6)
Let segmentation to be [S,T] and assuming that two dimensional histogram consists of
only two regions namely foreground and background, different probabilities of these
regions may be specified as
∑ ∑ (4.9)
118
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
∑ ∑ (4.10)
[ ] ∑ ∑ ∑ ∑ (4.11)
[ ] ∑ ∑ ∑ ∑ (4.12)
( ) ( ) (4.13)
( ( )) ( ) ( ) (4.14)
The input image is segmented into foreground (IF) and background (IB) sub-images
with help of . The threshold generated by two dimensional Ostu‘s method will
provide a better segmentation as compared to standard Ostu‘s method for images with
multimodal distribution and noise. This is because two dimensional Ostu/s method
considers neighbourhood pixels for extracting threshold value. The readers may refer
to study [237] for further details about Ostu‘s two dimensional thresholding.
Probability distributions for foreword sub-image (IF) and background sub-images (IB)
obtained in previous step can be calculated using Eq. 4.1 as ( ) and ( ).
In order to suitably enhanced these sub-images; individual probability distributions
are subjected to suitably defined constraints and modified accordingly. The modified
probability density functions for foreground ( ( )) and back-
ground ( ( ) ) frames can be specified as:
( )
( )
( ) {. / ( ) (4.15)
( )
( ( )) τ
( )
( )
( ) {. / ( ) (4.16)
( )
119
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
( ( )) ( ( ))
( ) ( ) ( ( )) (4.17)
( ) ( ) ( ( )) ( ( )) (4.18)
It can be seen in Eq. 4.15 and Eq. 4.16, that probability distribution functions of both
foreground and background are clamped with respect to certain threshold values.
These constraints are applied to control effects of dominating intensities and ignore
the effects of intensities with small PDF values. These are controlled with help of four
parameters (q, r, s, t) used in Eq. 4.15 and Eq. 4.16. Values of controlling parameters
(r, t) are fixed in the range from 0.1-1.0 and are used to control degree of
enhancement. If value of these parameters goes above this range, then over
enhancement tends to creeps in image. The degree or amount of enhancement is
controlled by power parameters (q,s); it helps in reallocation of less probable levels in
the corresponding sub-images with more probable levels. These are also confined to
range between (0.1 – 1.0) as values within this range helps in preservation of visual
details of the image. When value of power factor approach 1.0, the procedure behaves
like standard histogram equalization, when value goes beyond 1.0, more weight is
added to high probability levels and these constraints impose an even stronger effect
than HE which may result in over enhancement. The defined constraints are applied to
both sub-images separately and both are combined to generate new image Inew which
is passed to next step for constraint optimization.
120
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
range from (0.1-1.0). It is clear from the above discussion that combination of values
of these four parameters will result in production of different background and
foreground sub-images. Out of all these combinations, one will correspond to optimal
values of these parameters for which background and foreground sub images are
modified optimally. Since number of such combinations can be very large therefore
finding an optimal combination of such parameters is a computationally complex
problem. Such problems can be solved using soft computing based variants since soft
computing techniques have profound history in finding solutions for such problems.
One such recently proposed technique is water cycle optimization algorithm and this
section discusses how water cycle algorithm has been used to extract an optimal
combination of these parameters. We first discuss basic water cycle algorithm and
then propose use of water cycle algorithm to generate optimal value of parameters.
(4.19)
[ ]
[ ]
Then, a number of good raindrops i.e. solutions having cost function closest to current
best are chosen as rivers and rest of raindrops are considered as streams which flow to
the rivers and sea. For implementation of this effect, an initial population with
dimensions Npop × D is created (Eq. 4.19) where D represents number of design
121
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
(a)
(b)
Figure 4-2 Water cycle optimization process (a) Flow of streams to rivers, (b)
optimization process
variables and Npop is population size. Out of total of streams created initially,
represents best individuals from population which are designated as sea and rivers.
The rest of population are considered as streams flowing into rivers or into
sea directly. Depending on their magnitude of flow, each river absorbs water from the
streams. The amount of water in a stream entering a river and/or sea varies from other
streams. Sea is assumed to be most downhill location and rivers flow to the sea.
Figure 4.2 illustrates complete WCA optimization process and depicts flow of rivers
and streams towards sea. The figure also shows change in position of a stream after
iteration.
In order to designate/assign raindrops to the rivers and sea depending on the intensity
of the flow, the following equation is used
,| | - (4.20)
∑
where is the number of streams which flow into the specific rivers and the sea;
is the cost of respective raindrop.
( ) (4.21)
( ) (4.22)
122
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
‖⃗ ⃗ ‖ (4.23)
After evaporation, raining process is applied and new streams are formed in different
locations (similar to mutation operator in the Genetic Algorithms). In the raining
process, new raindrops form new streams (chromosomes in terms of GA) at different
locations acting similar to mutation operator in GA. To specify locations of the newly
formed streams, the following equation is used:
( ) (4.25)
where LB and UB are lower and upper bounds for given problem. Again, the best
newly formed raindrop is considered as river flowing to the sea. The rest of new
raindrops are assumed to form new streams which flow to the rivers or may directly
flow to the sea. Termination condition of WCA may be fixed as maximum number of
iterations or small tolerance value between consecutive iterations. The readers are
advised to refer to [238] [239] for more details about water cycle algorithm.
The main aim of proposed technique is to enhance contrast of input frame while
preserving brightness of source image. Two different functions have been used for
implementing this aspect where one will try to maximize contrast and other will be
used to preserve brightness. For preservation of brightness, we propose difference in
123
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
average intensities of enhanced and original image as one of the function which can
be calculated as:
( ) ( ) (4.26)
Several methods are available to measure contrast like contrast improvement index,
edge based contrast etc. In this approach, modified contrast index used by Y. Wang et
al. [240] has been considered in which contrast of image is measured by combining
different performance measures like entropy, sum of edge based intensities and
number of edge pixels. This can be specified according to Eq. 4.27
( )
( ) ( ( ( )) ( ) (4.27)
Colourfulness index (CCI) is used to measure colourfulness of frame. CCI reflects the
richness and vivid degree of colour present in an image and is measured according to
work of Hasler et al. [242]. In order to maintain colourfulness of frame, difference of
original and enhanced frame is taken as third objective function to optimize.
( ) ( ) (4.28)
The three metrics can be combined together to get a single function as:
(4.29)
In order to make final image rich in contrast with preservation of colourfulness and
brightness it is desirable to maximize value of E and therefore Eq. 4.29 has been taken
as objective function for the problem. and are weighing factors for controlling
levels of brightness and color component enhancement of image. The ideal values for
these weights shall be small as enhancement of contrast is more priory operations
targeted by system and values of other two functions can be just maintained as actual.
The value of these weights is set experimentally depending on nature and quality of
input image. The complete optimization process implemented using water cycle
algorithm is detailed in the next section with new algorithm for contrast enhancement
also elaborated.
124
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
This section illustrates how the problem of parameter detection has been solved using
water cycle algorithm and used for enhancement of input frame. The value of
proposed objective function (E) is combination of three individual functions providing
modelling of contrast, brightness and colour. According to concepts discussed in
previous sections, enhancement of a frame or image is affected by parameters
( ) and it is very difficult to choose an optimal combination for which values of
enhancement can be maximized. To make image more natural and colourful,
objective function in Eq. 4.29 was proposed. Therefore combination of ( )
values will also affect the calculation of function given in Eq. 4.29.
( ) ( ( )) (4.30)
The complete algorithm to perform enhancement of input image or frame is given as:
2. Extract Y channel and use 3x3 Gaussian mask to smoothen input image. Also
extract CbCr component of frame.
5. Use Water cycle algorithm for finding optimal values of (q, r, s, t) for
enhancing IF and IB
125
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
c. For all population species, extract new probability density functions for
foreground and background according to Eq. 4.15 and 4.16.
h. Model flow of streams to rivers and rivers to sea according to Eq. 4.21
and 4.22 and generate new positions for streams and rivers.
The above algorithm inputs image or frame in first step and as part of pre-processing
operation extracts Y channel of image after converting from RGB space to YCbCr
colour space. The input image is segmented into foreground and background sub-
images using two dimensional Ostu‘s thresholding principle (step 3, step 4). Two
dimensional Ostu‘s method has been utilized as it is more suitable to complex or
126
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
natural images. Both sub images are enhanced separately by subjecting probability
density functions of foreground and background to specifically designed constraints.
The designed constraints can be controlled with four parameters (q,r,s,t) as illustrated
in previous sections. Different combinations of these parameters will constitute for
different enhanced versions of final image and in order to select an optimal value,
water cycle algorithm has been used (Step 5). WCA first generates a random
population of raindrops (stream) within fixed lower and upper bound. The algorithm
then proceeds to initialize sea, rivers and streams from initial population. Flow of
streams to rivers and rivers to sea is modelled for fixed number of iterations and best
solutions are re-designated as sea or rivers. The objective function for water cycle
optimization is considered to be a three dimensional function that tends to enhance
contrast and preserve brightness and colourless of input image. The best solution is
utilized for modification of foreground and background sub-images which are
eventually combined to generate final enhanced Y channel image. The CbCr
components are added to the enhanced Y channel image to get the final image.
127
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
(a) (b)
(c) (d)
(e) (f)
Figure 4-3 Comparison of enhancement results on Lenna image (a) Original image, (b)
HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
The first test was conducted on standard Lenna image and obtained results are
presented in Figure 4.3. It is clear from the figure that HE was not able to preserve
128
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
original color of image and over-enhances it as shown in Figure 4.3(b). The results
obtained by CLAHE and RMSHE in Figure 4.3 (d) and Figure 4.3 (e) are almost same
(a) (b)
(c) (d)
(e) (f)
Figure 4-4 Comparison of enhancement results on camel and desert image (a) Original
image, (b) HE, (c) BBHE, (d)CLAHE, (e) RMSHE, (f) Proposed method
129
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
and both these techniques were not able to remove haziness from original image.
Improved results are shown for BBHE (Figure 4.3 (c)) but it can be seen that BBHE
was not able to preserve texture of hair and cream colour in background has been
converted to white. The results of the proposed method are shown in Figure 4.3 (f)
and it can be observed that proposed method was not only able to provide a contrast
rich image but colour and details of image were also preserved. The final obtained
image is more natural, colourful and visually pleasing.
Figure 4.5 shows results of various algorithms for foggy bench image. It can be seen
that original color of sand and grass are lost after performing enhancement using HE,
BBHE, CLAHE and RMSHE methods. Some white spots can be observed on portions
of image covering bench in HE, BBHE and RMSHE which signals over enhancement
but no such spot could be traced in final image generated by proposed technique.
(Figure 4.5(f)). There is also some portion of the ground for which color of soil has
been changed by all techniques where as no such change can be observed in the
results of proposed method. This is because proposed method converts image from
RGB to YCbCr which helps to preserve color details. Suitably designed objective
function has also resulted in controlled enhancement with no side effects. This
indicates that enhancement made by proposed technique is controlled and no side
effects can be observed. The enhanced image looks rich in contrast and haziness has
been removed from background in a far better way than any of the other methods. In
Figure 4.6, a redundant bright spot has been generated in background for HE and
130
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
BBHE methods signaling over enhancement of source image. In addition HE, BBHE
and RMSHE were not able to perform enhancement of lower sub areas of image.
Results of CLAHE and proposed method seem to be comparable however proposed
(a) (b)
(c) (d)
(e) (f)
Figure 4-5 Comparison of enhancement results on foggy bench image(a) Original image,
(b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
131
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
(a) (b)
(c) (d)
(e) (f)
Figure 4-6 Comparison of enhancement results on Tienamen image (a) Original image,
(b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
method was able to preserve colors of the source image which was not the case with
CLAHE. It is because of the objective function implemented by proposed algorithm
which makes sure that brightness and colorfulness of input image are maintained.
132
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
(a) (b)
(c) (d)
(e) (f)
Figure 4-7 Comparison of enhancement results on aircraft image (a) Original image,
(b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
Figure 4.7 depicts results obtained for various algorithms for aircraft image. It can be
observed that proposed method was able to preserve details of aircraft while others
algorithms have failed completely. Techniques like HE, BBHE and RMSHE have
completely failed in rendering any enhancement to the source image. The results of
133
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
proposed technique are quite appreciable as proposed algorithm uses three different
functions to extract ideal values of parameters for controlling enhancement.
Figure 4.8 depicts another instance of the failure of contemporary techniques like HE,
BBHE, RMSHE to provide enhancement in foggy environment. These techniques
were not able to enhance regions that are far away from the source; in addition color
information of truck is also lost in HE and BBHE methods. Results of CLAHE seem
to be better but whiteness and artifacts can be seen in portions of image. The results of
proposed technique are much better than all other techniques.
The proposed method was also tested for enhancement of video frames from
CAVAIR dataset. Such sequences were downloaded from [162]. This section is
devoted to discussion on the results obtained for these videos. We first present visual
results obtained on CAVIAR dataset. CAVIAR dataset consists of object detection
and tracking videos captured inside university campus. More details about the
CAVIAR and other datasets have been discussed in Chapter 2.
(a) (b)
(c) (d)
134
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
(e) (f)
Figure 4-8 Comparison of enhancement results on foggy bus image (a) Original
image, (b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
Figure 4.9 and 4.10 projects obtained results on C2 and br3 videos of CAVAIR
dataset. Results of all methods are appreciable in. this may be attributed to the fact
that C2 is indoor video without any noise. In Figure 4.10, results of proposed
(a) (b)
(c) (d)
135
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
(e) (f)
Figure 4-9 Comparision of enhancement results on frame #246 of c2 video (a) Original
image, (b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
technique are found to be better than all methods. The areas in top right corner of
frame were also enhanced which was not the case with contemporary techniques.
(a) (b)
(c) (d)
136
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
(e) (f)
Figure 4-10 Comparison of enhancement results on Frame #3 of br3 video (a) Original
image, (b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
In order to access performance levels of the proposed technique, it was decided to test
it on hazy sequences, hazeroad and riverside. The hazeroad video sequence is of 60
(a) (b)
(c) (d)
137
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
(e) (f)
Figure 4-11 Comparision of enhancement results on frame# 55 of hazeroad video (a)
Original image, (b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
sec. duration with frame dimensions of 720 x 400, total frames =1500 captured at 25
frames per second. The riverside video sequence is of 20 sec. duration, frame
dimensions 640 x 480, 24 frames per second with total 489 frames. The visual results
of different algorithms on frames#55 and frame#200 of hazeroad video sequence are
shown in Figure 4.11 and Figure 4.12 respectively. It can be clearly seen that
contemporary techniques were not able to enhance regions which are far from the
capturing camera. The proposed technique is able to remove the hazy effects in the
video more effectively than all the methods. The output frames are much clear and
sharper than other methods; this is because of the adaptive nature of proposed
technique. The appearance of road and sign boards is much fine in Figure 4.11(f)
because proposed method is able to preserve details of frames.
(a) (b)
138
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
(c) (d)
(e) (f)
Figure 4-12 Comparision of enhancement results on frame# 4 of riverside video (a)
Original image, (b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
Figure 4.13 and Figure 4.14 presents results obtained on frames 4 and 154 for
riverside hazy video sequence. The results of proposed method are better than all
contemporary technique which justifies its applicability to hazy videos also.
(a) (b)
139
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
(c) (d)
(e) (f)
Figure 4-13 Comparision of enhancement results on frame# 154 of riverside video(a)
Original image, (b) HE, (c) BBHE, (d) CLAHE, (e) RMSHE, (f) Proposed method
4.5.1 Quantitative Results of Proposed Method
Apart from visual results depicted in previous paragraphs, the quality of test images
and frames enhanced using various algorithms shall also be measured quantitatively
using some statistical measures. A number of parameters could be used for this
purpose and some of these have been utilized in this study. Since the proposed study
aims to enhance contrast, preserve details and colourfulness therefore parameters like
discrete entropy, edge based contrast, contrast improvement index, colourfulness,
MSE and PSNR has been used for evaluating proposed technique. Tables 4.1-4.6
demonstrates values of these parameters as obtained on different algorithms. Discrete
Entropy is a useful parameter for measuring details of any image and measures
information content in an image after enhancement. It is useful measure for measuring
image quality and can be measured using Eq. 4.31
140
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
( ) ∑ ( ) ( ) (4.31)
The value of discrete entropy shall increase desirably and an algorithm is termed as
good when it is able to preserve or minimize change in the value of discrete entropy
of original and enhanced frame. In Table 4.1 describes values of discrete entropy for
various test images/ frames used in this study. It is seen that proposed algorithm either
increased value of entropy of an image or maintain same magnitude as original. This
means that the details of source image were preserved by objective function and
results are encouraging.
141
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
7. Mountains
38.6174 40.7504 37.4932 42.65657 38.3540 45.3334
15. frame #3- br3 32.4323 36.7071 32.8179 39.412 33.1266 39.487
142
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
143
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
15. frame #3- br3 1.000 0.0192 0.0574 1.6982 1.69054 2.1789
16. frame #43 -br3 1.000 0.0256 0.0416 1.2351 1.3245 1.5974
(4.32)
(4.33)
where Xf and Xb are maximum and minimum luminance values of foreground and
background regions in local window size of 5*5. Higher value of cii represents better
image quality. Values of cii reported in this study have been normalized according to
image size to make them meaningful. Table 4.3 lists values of cii obtained for various
methods, value of cii for original image comes to be 1. Observing tables 4.2 and 4.3,
it is clear that proposed approach was able to enhance the contrast of almost all
images effectively. The values of cii observed for almost all frames and videos show
an improvement as compared to other methods. This is because of the fact that the
144
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
145
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
objective function used in proposed method tends to increase contrast without any
multiplicative index as compared to other functions. This eventually leads to rise in
the observed values. The table depicts an increase in values of contrast and cii over
other methods suggesting effectiveness of proposed algorithm.
( )
(4.34)
The used metrics assumes image is coded in the sRGB color space and measures
colorfulness metric as:
̂ √ √ (4.35)
where standard deviation and the mean value of the pixel is given by σ and µ. The
colorfulness can then be specified as
̂ ̂ ̂ (4.36)
The values of colourfulness have been tabulated in Table 4.4. The effectiveness of the
proposed algorithm in preserving colour of original frame is also justified when we
observe the values obtained for various test images and frames. The proposed method
is efficient in terms of improving colourfulness for almost all images barring a few,
even in those values observed values are rather competitive. The observed values in
shows that original values of images and frames are either preserved or enhanced
suitably in addition to enrichment of contrast values and preserving details. This is
because proposed multi objective function considers colourfulness as one of input
variable in which difference between original and enhanced image is used. It helps to
keep colourfulness of test frames in check and prevent any loss in naturalness. The
146
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
147
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
148
CHAPTER 4
MULTI OBJECTIVE WATER CYCLE ALGORITHM BASED IMAGE ENHANCEMENT
values depicted in table shows that the proposed method is justified for preserving
colourfulness of original image as obtained results are quite promising. The observed
values show considerable improvement over other contemporary methods.
MSE and PSNR measures borrowed from signal processing have also been used
historically for evaluation of image quality. Although their findings cannot be
considered reliable nevertheless, their use is still common practice and for the sake of
completeness these have also been included in our study. Tables 4.5 and 4.6 enlist
values of MSE and PSNR for test images respectively. The mean square
error(MSE) between two images I(i, j) and J(i,j) of size (M x N) can be defined as:
∑ ∑ , ( ) ( )- (4.37)
Since MSE depends strongly on image intensity scaling (number of bits used for
single pixel), therefore Peak-signal to Noise Ration (PSNR) measure is used, which is
calculated as
⁄ (4.38)
where L reflects the maximum value of a pixel; high signal to noise ratio will be
generated for a small value of mean square error. More similarity between original
and final image will result in 4.5 and 4.6 minimization of MSE parameter and
enhancement of PSNR parameter. Tables suggest that the outputted values of
proposed technique are in correlation to the values for other parameters. Tables show
that values of MSE have decreased as compared to other methods and values of PSNR
have been increased. It justifies that proposed method was successful in reducing the
error in the processed frame.
149
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS
150
ON THE SOFT COMPUTING BASED APPROACHES FOR OBJECT DETECTION AND TRACKING IN VIDEOS