Jsaer2016 03 02 243 252

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Available online www.jsaer.

com

Journal of Scientific and Engineering Research, 2016, 3(2):243-252

ISSN: 2394-2630
Research Article CODEN(USA): JSERBR

Adaptive Image Enhancement

Othman O Khalifa, Amir Faliq Bin Abd Wahid

Electrical and Computer Engineering, International Islamic University Malaysia


Abstract Currently we are living in digital era. Therefore, the image multimedia is a crucial issue in our daily
life. It may be categorized the digital multimedia over still image or a video image. Digital multimedia
transmission helps everyone to keep information fresh where they can access it everywhere, anytime. In this
paper, an adaptive image enhancement using different enhancement technique was developed. The focus in this
work is to create an adaptive program that can improve the appearance of digital images by clicking on a single
button. Images might suffer from the lack of brightness, overexposed to luminance, blurriness and noise from
low light exposure. The adaptive image enhancement used different types of enhancement techniques in spatial
domain. The results from the simulation shows the value of peak signal to noise ratio and the mean square error
that will be used to calculate the difference in both original and enhanced images.

Keywords Image enhancement; Image filtering; Image segmentation;Spatial Domain Technique, Histogram
equalization, Gamma Correction.
Introduction
Nowadays, everything bit of information can be extracted through an image. Moreover, it is common to use the
techniques and the systems. This study relates generally to design and improve the quality of a digital image by
using the existing image enhancement techniques, adaptively. Image enhancement is important in almost work
field nowadays such as medical image analysis and top view of satellite images. Throughout studies, there are
lots of utilization over some work of field such as the investigation of metabolic processes of plant and animal
cells mostly research by the biologist, archeologist use this techniques to go through some ancient scripts.
Therefore, there are many equipment especially to maximize the image techniques so it can be assess more
efficiently. Jobs are created to help this area of work field so that it allow researcher to acquire the images for
investigation using varied recording accessories so that everything can be done faster and dynamically.
Eventually, every images that had been taken can be fix. In this paper, MATLAB application [1] will be used to
create a Graphical User Interface (GUI). A GUI can be designed so that it can combine several techniques to
create an adaptive image enhancement by clicking a single button. These image enhancement techniques help
image to be fix from suffering a distortion such as blurry effect due to shaking, dark images because of small
depth of field, or bright images due to room conditions. Many variant of algorithms for converting, inspect,
diagnose and understanding the meaning of image patterns are possible today due to the advanced research of
image processing and analysis technology and also continuation efforts of experts on trying to find more ways
of obtaining important information [2].

Journal of Scientific and Engineering Research

243
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

Image Enhancement Techniques


This paper focuses on the image enhancement in spatial domain. There are three types of image enhancement
techniques were used; Contrast Stretching, Gamma correction and Unsharp masking / edge enhancement.
These techniques were chosen based on specification. For edge enhancement, it can produce an increased over
detail areas and keep it unchanged in the uniform areas. It can increase the quality of an image by sharping a
corner from a picture (by pixel) [3-4]. Histogram equalization will help an image to be modified such that it can
be visible when adjusting to a certain level. Please take note that, adaptive image enhancement is another level
of automation that need a proper observation on how the techniques is being implemented. There will be many
outcomes to this combination of image enhancement techniques. The tools that will be used are the MATLAB.
MATLAB is used by millions of engineers and scientist worldwide with their interactive environment and high-
level language. Later, the discussion regarding those 3 techniques will be detailed.
Table 1: Summary on Image Enhancement Technique in Spatial Domain
Author Technique Strength Limitation
Mansung Kim [10], Unsharp Masking Enhance the edge and detail The system is sensitive to
2014 information in an image noise
S Bedi [12], 2013 Histogram Create a better distributed Poor sharpness and contrast
Equalization histogram

Kandasan, R [14], Image Negative Enhancing white or gray detail Produce different outcome
2014 from original scene
Simon, N. [13], 2014 Contrast Stretching Produce various degrees of spread Details in an image might be
in gray level lost as the effect of stretching
Maini, R. & Compression of Change narrow range of low level Noise is created when
Aggarwal, H [1], Dynamic Range input gray into wider range changing the gray level
2010
R. Fisher [10], 2003 Image Averaging Remove noise from a series of The samples will be averaged
noisy images to zero if the image have zero
noise

Proposed Techniques
For the adaptive image enhancement technique, the contrast stretching method will be used. The intensity value
of an image can be stretch to that it can give a desired output. With the contrast stretching, it gives a full
potential to the pixel to increase or decrease the intensity value. To precise, contrast stretching method is easy
compared to other type of image enhancement techniques such as histogram specification.
The upper and the lower pixel value of the image need to be analyzed before it can be stretched. By using 8-bit
gray level images, there will be lower and upper limits from 0 to 255. The lower limits and the upper limits can
be set as a and b. As the image is being normalized, it is sorted to find the minimum and the maximum pixel
values that is currently occupied in the image. These are c and d. pixel P is scaled within the equation:
𝑏−𝑎
𝑃𝑜𝑢𝑡 = 𝑃𝑖𝑛 − 𝑐 +𝑎 (1)
𝑑−𝑐
Take note that the values of that is below 0 (negative) will be set to 0 and those value that is higher than 255 will
be set to 255.
Contrast stretching has some weaknesses. The value of c and d can be affected when dealing with single pixel.
This could cause abnormal scaling due to very high or very low enhancement.
Gamma correction is another technique of transformation. Different level of enhancement can be obtained
through this type of transformation function. Different manufacturer create a different display monitor display
with their own specific intensities and clarity. Therefore, display monitor play the main role over this
techniques, whether it has built-in gamma ranges which can give the best output for the user.
Edge enhancement filter or unsharp masking was chosen. This is because it can improves image details and
other high frequency components in edge area using the original image and subtract it over a processed image. It

Journal of Scientific and Engineering Research

244
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

can create an enhancing details in an image [15]. This method focuses on high pass filter, followed by low pass
filter.
An unsharp masking filter generates a detail image 𝑑 𝑥, 𝑦 from an input image 𝑓 𝑥, 𝑦 by the following
equation
𝑑 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 − 𝑓𝑠 𝑥, 𝑦 (2)
To find 𝑓𝑠 𝑥, 𝑦 (smooted image of 𝑓 𝑥, 𝑦 ,
𝑓𝑠 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 ∗ 𝐻𝑃𝐹 (3)
The block diagram with High Pass filter (HPF) Low Pass filter (LPF) being applied is shown in figure 1.
The following are used in coefficient for high pass filter and low pass filter.

(4)
Where,
𝑓𝑠,2 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 − 𝑓 𝑥, 𝑦 ∗ 𝐻𝑃𝐹 ∗ 𝐿𝑃𝐹 (5)

Figure 1: Block diagrams of the (a) general unsharp masking filter, (b) unsharp masking with low pass filter
channel [10].
Histogram equalization is one of the ordinary methods in image enhancement. It has the ability to enhance the
edge contrast over images and also videos. It also uses stochastic probability distribution of each channel level

Journal of Scientific and Engineering Research

245
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

of color images [11]. Therefore, it always been the one with the best approaches to improve the image contrast
or to conserves the luminosity of image. Over a continuous quantity, pixel value can be normalized [10].
Two additional filters are added instead unsharp filter, median filter and average filter. Median filter, like other,
are used to remove noise. It also being used widely because it preserves edges while removing noise. The idea
of median filter is sliding a pixel like a window so it will be sorted out. Average filter used an algorithm that
change each pixel value with the mean value different spot of pixel, including the pixel itself. This will change
the existing pixels value like a convolution filter. [13].

Simulation Implementation
In this paper, MATLAB was used where the step by step methodology is shown. The program consists of panels
that show different selection. The selections are from auto enhancement, manual enhancement, filtering option,
and noise generation option.
Here are lists of buttons including its function for the graphical user interface created:
 Load Image – Load the image. Image format consist of .jpg, .bmp, .jpeg, and .png.
 Contrast – Auto contrast to the original image.
 Gamma – Gamma correction to the original image.
 Unsharp – Filter the original image using the unsharp filter algorithm.
 Median – Apply the median filter to the original image.
 Average – Apply the average filtering to the original image.
 Salt & Pepper – Set the original image to salt & pepper noise.
 Speckle – The original image will be filled with speckle noise.
 Reset – Reset the enhanced image back to the original image.
 Save Image – Save the current applied enhanced image to hard drive.
 PSNR – Show PSNR and MSE of original and enhanced image.

Figure 2: Selected menus after image selection for the program simulation.
Figure 2 shows the image selection, the image will have techniques to be choose on. The program will be able to
change the histogram when applying any techniques even in the manual enhancement. Then, it will able to show
the PSNR of the image.

Journal of Scientific and Engineering Research

246
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

Results and Analysis


Currently, the focus is to create a suitable algorithm that can improve the image quality. The effectiveness of the
algorithm and its efficiency play the critical role in this part. Therefore, it is crucial to understand the definition
of each method correctly.First, the program is tested using an image that have low aperture value (too
dark).From the test, using the contrast button give the above image. All the pixel intensity in the image above
are stretched so that it achieve a desired output. In histogram equalizer, the enhanced image get a high noise
effect. Average PSNR shows that low value of ratio which explained the contrast method affect a high percent
of the image quality

Figure 3: Underexposed image corrected using contrast adjustment.


Next, an image that have a high exposure image which brighten the image were used.
The analysis showed that the contrast enhancement that had been done to this image reduced most of the pixel
intensity. In the histogram equalization graph, the value cannot be seen as most of the pixel have high value
(maximum of 255). The average PSNR also show low value due to many changes to each pixel in this
image.Gamma correction is used to optimize every pixel in a still image. It provide quality boost to picture that
have good shots.

Figure 4: Overexposed image corrected using contrast adjustment.

Journal of Scientific and Engineering Research

247
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

Figure 5: Enhanced image using gamma correcting.

In this observation, the Blue MSE and PSNR doesn’t not change because of gamma correction properties. The
gamma value only comprise the bright color pixel so it can enhance it for human viewing.

Figure 6: Blurred images sharpen using unsharp filter.

Low shutter speed causes an image to have blurred. Using unsharp filtering, they image was analyzed. It seem
that pixels intensity are distorted so it can enhanced the edge of the original image.The image from figure 6 is
then being filtered by using median filter.

Journal of Scientific and Engineering Research

248
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

Figure 7: Salt & Pepper noise being added to the original image.

The noise generated by using salt & pepper noise create a distort value to the histogram equalizer. The average
PSNR shows the quality of image that worsen when applying noise.

Figure 8: Salt & pepper noise removed by using median filter.


Applying Median filter almost completely removes the salt & pepper noise. Even though, it still could not
generate a similar output from the original image. The histogram equalizer also shows some spike due to noise
that were generated.
Lastly, the original image is then being added with speckle noise.

Journal of Scientific and Engineering Research

249
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

Figure 9: Image with speckle noise.

Then, applying the average filter from the image from figure 10.

Figure 10: Average filter being applied to the distorted image.

Journal of Scientific and Engineering Research

250
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

Figure 11 Average filter being applied five times (5x) to the image from figure 11.

Speckle noise is complicated noise which degrades the quality of an image by granulated it. This noise often
being seen with images that have high ISO, or in low light places taken from space. Here are the summary for
the type of enhancement that had been made.
Table 2: Average MSE and PSNR for all categories of analysis
Image Number Image Condition Enhancement Technique MSE PSNR
Image 1 Underexposed Contrast 13298.01 6.94 dB
Image 2 Overexposed Contrast 7494.26 9.57 dB
Image 3 Normal Gamma Correction 2215.53 Infinity
Image 4 Blurred Unsharp Filter 32.54 33.05 dB
Image 5 Salt & Pepper - 362.68 22.57 dB
Image 5 Salt & Pepper Median Filter 0.95 48.41 dB
Image 6 Speckle - 746.61 19.51 dB
Image 6 Speckle Average Filter 87.88 28.77 dB
Image 6 Speckle Average Filter (5x) 24.70 34.25 dB

Conclusion
Images are affected with many variables. The enhancement technique can help reduce some of the noise or
distortion of an image. The enhancement algorithm can increase the image quality within a short amount of
time. With right implementation, the algorithm can produce a robust and efficient output. Therefore, optimizing
the image and give faster output in image enhancement techniques. Furthermore, the graphical user interface
have been made in user friendly simulation where it can also been use in manual mode.

References
[1]. http://www.mathworks.com/products/matlab/
[2]. Maini, R., & Aggarwal, H. (2010). A Comprehensive Review of Image Enhancement Techniques.
JOURNAL OF COMPUTING, 2(3). Pg. 8-13.
[3]. Sawant, H. K. and Deore, M, A Comprehensive Review of Image Enhancement Techniques,
International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1, Issue
2, pp. 39 – 44.
[4]. Jeon, G. (2014). Color Image Enhancement by Histogram Equalization in Heterogeneous Color Space.
International Journal of Multimedia and Ubiquitous Engineering, 9(7), 309-31 8.

Journal of Scientific and Engineering Research

251
Khalifa OO & Wahid AFBA Journal of Scientific and Engineering Research, 2016, 3(2):243-252

[5]. Badea, C., &Pallikarakis, N. (n.d.). Enhancement by Point Processing. From


http://bme.med.upatras.gr/improc/enhancement_point_processing.htm#2. Histogram Processing
[6]. Drakos, N., & Moore, R. (n.d.). Histogram Specification. Retrieved May 6, 2015, from
http://fourier.eng.hmc.edu/e161/lectures/contrast_transform/node3.html
[7]. Fisher, R., Perkins, S., Walker, A., &Wolfart, E. (2003, December 1). Pixel Subtraction. From
http://homepages.inf.ed.ac.uk/rbf/HIPR2/pixsub.htm
[8]. Polesel, A., Ramponi, G., & Mathews, V. (2000). Image enhancement via adaptive unsharp masking.
IEEE Transactions on Image Processing, 9(3), 505-510.
[9]. Fisher, R., Perkins, S., Walker, A., &Wolfart, E. (2003). Contrast Stretching. From
http://homepages.inf.ed.ac.uk/rbf/HIPR2/stretch.htm
[10]. Kim, M., Lee, S., & Jeon, G. (2014). A New Filter-Based Unsharp Masking. Advanced Science and
Technology Letters, 45, 30-33.
[11]. Histogram Equalization. (n.d.). From http://dmmd.net/main_wp/intuitive-mathematics/histogram-
equalization/
[12]. Bedi, S., &Khandelwal, R. (2013). Various Image Enhancement Techniques - A Critical Review.
International Journal of Advanced Research in Computer and Communication Engineering, 2(3), 1605-
1609.
[13]. Simon, N. (2014). Contrast Enhancement Of Color Images Using Improved Retinex Method.
International Journal of Research in Engineering and Technology, 279-285.
[14]. Kandasan, R. (2014). Image Compression Using Negative Format. International Journal of Research in
Engineering and Technology, 225-228.
[15]. Schettini, R., Gasparini, F., Corchs, S., Marini, F., Capra, A., &Castorina, A. (2010). Contrast Image
Correction Method, Journal of Electronic Imaging, 023005-023005.

Journal of Scientific and Engineering Research

252

You might also like