Object-Based Image Enhancement Technique For Gray Scale Images
Object-Based Image Enhancement Technique For Gray Scale Images
Object-Based Image Enhancement Technique For Gray Scale Images
3, June 2014
ABSTRACT
Image enhancement technique plays vital role in improving the quality of the image. Enhancement
technique basically enhances the foreground information and retains the background and improve the
overall contrast of an image. In some case the background of an image hides the structural information of
an image. This paper proposes an algorithm which enhances the foreground image and the background
part separately and stretch the contrast of an image at inter-object level and intra-object level and then
combines it to an enhanced image. The results are compared with various classical methods using image
quality measures.
KEYWORDS
Image Enhancement, Morphological watershed segmentation, Object-based contrast enhancement, Inter-
object stretching, Intra-object stretching.
1. INTRODUCTION
Basically image enhancement [3] improves the quality of the image so that the result is more
suitable for a specific application and for human perception. Image enhancement techniques are
widely used in many real time applications. The contrast enhancement in digital images can be
handled by using various point processing techniques[2]-[7] like power law, logarithmic
transformations and histogram equalization(HE).Image enhancement using power law
transformations depends upon the gamma values, if the gamma value exceeds 1, the contrast is
reduced.The logarithmic transformation [2]-[4] improve the contrast of the image, but increases
the overall brightness.The most widely used technique of Contrast enhancement is Histogram
Equalization (HE)[1]-[5], which works by flattening the histogram and stretching the dynamic
range of the gray-levels using the cumulative density function of the image. However, there are
some drawbacks with histogram equalization [8] especially when implemented to process digital
images. Firstly, it converts the histogram of the original image into a uniform histogram with a
mean value at the middle of gray level range. So, the average intensity value of the output image
is always at the middle – or close to it. In the case of images with high and low average intensity
values, there is a significant change in the image outlook after enhancing the contrast and some
noise is also introduced into the image. Secondly, histogram equalization enhances the image
based on the global content of the image and in its discrete form large bins cannot be broken and
reordered to produce the desired uniform histogram. In other words, HE is powerful in
highlighting the borders and edges between different objects, but it may reduce the local details
within these objects, particularly smooth and small ones. One more consequence for this
DOI : 10.5121/ijait.2014.4302 9
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
mergence between large and small bins is the creation of over enhancement and saturation
artifacts [10]. Recently a histogram equalization based contrast enhancement has been proposed
[24], which improve the image in poor lightning. Many attempts have been made so far to
improve the performance of Histogram Equalization [3],[8]-[10],[24].
Even though image enhancement techniques, generally not required for automated analysis
techniques, have regained a significant interest in recent years. Most of the existing automatic
enhancement techniques make use of global intensity transforms, either for color correction
(white balancing) or contrast enhancement. For these global intensity transforms, the mapping of
color or intensity is one-to-one and is independent of pixel location or scene context. Such
techniques would not work well for images where different parts of the image require different
types of correction, e.g., the darker portions of an indoor scene requires higher contrast tuning and
different Color adjustment than the window, or it is necessary to highlight the subject by
enhancing contrast between the subject and its background [1]. The Object Based Multi-Level
Contrast Stretching Method dividing the input image into its constituent objects, and apply
stretching strategies based on type of the objects. This object-based multilevel enhancement
method can produce enhanced images without ringing, blocking and false contouring artifacts.
This paper proposes an object based technique to enhance the local contrast in the spatial
domain. It uses morphological opening operation for finding gradient thresholding. The paper is
organized as follows. Section 2 describes the Basic Terminology. Section 3 describes Object
Based Contrast Stretching (OBCS). Section 4 presents the Comparison Of Object-Based Contrast
Stretching with existing methods. Section 5 presents conclusions.
2. BASIC TERMINOLOGY
2.1. MORPHOLOGICAL OPERATIONS
Mathematical morphology [6] is the part of set theory, which has a robust geometric orientation.
Mathematical morphology presents a well-found theory for analysis and processing for binary
images.
Consider a 2D digital image A⊆ Z×Z and a point u ∈ Z×Z, the transition of A by u is given by
equation (1)
(1)
Dilation and Erosion are the fundamental morphological operations which are given by (2) and
(3) respectively
(2)
(3)
In terms of dilation and erosion another pair of morphological operations are defined known as
closing and opening given by (4) and (5) respectively..
10
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
(4)
(5)
.
2.2. EDGE DETECTION
An edge [7] is a connected set of pixels on the boundary between two regions. There are many
ways to perform edge detection. The edge detection is categorized into two categories.
The First Order Derivative is a gradient method which detects the edges by looking for the
magnitude of gradient in the image, and the Laplacian method searches for zero crossings in the
second derivative of the image is used to find edges.
The magnitude of the gradient G(x, y) of the image I(x, y) is defined as given in equation (6)
G(x, y) = [G2X(x, y) +G2Y(x, y)] 1/2 = [[∂I(x, y)/ ∂x]2+[∂I(x, y)/ ∂y]2]1/2 (6)
For the given input image an efficient gradient computation is applied to find the edges, i.e.,
smoothing, sharpening the image. The gradient components GX(x,y) and GY(x,y) can be obtained
by using the Prewit or Sobel operator as given in Fig 1. A more practical version of G(x, y) is its
approximation using absolute values as given in equation (7).
(a) (b)
Fig.1: Sobel masks used to compute gradient components along GX and GY
The watershed transform [13]-[16] is a well known segmentation method coming from the field
of mathematical morphology. Watershed algorithm for image segmentation on the grey levels of
neighbouring pixels, assumes that a hole is drilled in minimum of the surface, and water flows
from different positions into the hole. The hole is supposed to be a central pixel of a
neighbourhood. For the following 3x3 and 5x5 grey level masks, the watersheds are recognized
with a peak or highest level h>=20, and the Peak points are shown in Fig 2 and Fig 3.
11
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
When we increase highest level (h) value ,water will fall from peak top points to bottom points
and creates a good watershed.
Based on the similarity constraints, Region Growing [17]-[18] method merges small pixel regions
or sub regions into larger regions. Identify the set of seed points in the image, and region
growing is applied to each seed pixel and is appending with adjacent pixels that have similar
properties like color or gray level value.
For the given input image efficient edge detection algorithm is applied using Sobel operator.
• In this step apply gradient computation on the input image using GX and GY along X-direction
and Y-direction respectively.
12
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
IINPUT IMAGE
GRADIENT COMPUTATION
GRADIENT THRESHOLDING
MORPHOLOGICAL WATERSHED
REGION MERGING
YES NO
IS M1 > M2
OUTPUT IMAGE
STOP
The approach of gradient thresholding provides a simple and effective way to prevent over-
segmentation, by providing markers to watershed segmentation. The process is defined by
equation (8).
(8)
where Gth(x, y) is the threshold gradient magnitude, GT is a given threshold. The value of GT can
be determined based on the following condition.
Where G ᴏ B is the opening operation performed on G by the disk shape structuring element B of
size 3*3.
For the given input image an efficient gradient thresholding is applied to find the improved
threshold image.
Step 2: Apply Gradient Thresholding to the Gradient Computation image to find improved
threshold image.
14
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
Step 3: Apply Morphological Watershed to the improved gradient threshold image to get
the segmented image.
After image segmentation the segmented regions featuring homogeneous intensity and bearing
contrast to their adjacent neighbours are extracted. These regions are treated as the objects that
constitute the image. In order to enhance the image at inter-object level and intra-object level
15
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
respectively, the image is split into two sub-images namely Object approximation image and
Object error image.
Step 5: In this step the the Foreground and Background images are detected.
M1=Ʃ Ʃ R1(i, j)
M2=Ʃ Ʃ R2(i, j)
If (M1 > M2)
R1 is the foreground image
Else
R1 is the background image
The object approximation image (Ia) can be obtained by subtracting the mean value of watershed
image(W) of the corresponding region from the input image(I).
Step 6: In this step subtract mean value of the watershed image of the corresponding region from
each pixel intensity value of the input image to get object approximation image.
Where Ia(x, y) is an Object Approximation Image, Iε(x, y) is an Object Error Image and Iµ (x, y) is
an Mean value of the original input image.
Step 7: In this step subtract the value of approximation image from the mean value of the input
image to get object error image.
The contrast stretching is applied on the image objects at inter object level and intra object level.
At inter object level an approach of stretching between adjacent local extremes is used to change
the local contrast between objects. At intra object level the uniform linear stretching is used to
enhance the textural features of objects while maintaining their homogeneity.
Step 8: In this step stretching between adjacent local extremes is used to change the local contrast
between objects.
Step 9: In this step the uniform linear stretching is used to enhance the textural features of objects
while maintaining their homogeneity.
Enhanced images of inter object stretching and intra-object stretching can be combined together
to reconstruct the final output enhanced image. Since the enhancement operation is directly
applied to the object, the final enhanced image does not suffer from ringing, blocking, or other
false contouring artifacts. Moreover,nose is not enhanced, since the uniform linear stretching is
applied to homogeneous regions.
Step 10: Algorithm for getting the output enhanced image by using inter-object stretching and
intra-object stretching images is given below.
17
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
Input: I’a (Inter Object Stretched Image), I’ε (Intra Object Stretched Image)
Output: I’ (Enhanced Image){
% Calculate the Region Mean values from the inter object stretched image
% Now perform the following operation for image enhancement
If (Region belongs to inter object stretched)
I’= I’a + Inter Object Stretched Region mean
Else
I’= I’a - Inter Object Stretched Region mean
}
We can compare different contrast enhancement techniques by using subjective and objective
assessment. The subjective assessment is an estimation of quality where there is no pre
established measure and is based only on the opinion of the evaluator. The quantitative measures
are used for objective assessment. However we have used entropy as the quantitative measures.
Entropy is a statistical measure of randomness that can be used to characterize the input image.
(e) (f)
Fig 1: Results for Lena: (a) input Image (b) result of HE Method (c) result of power Law Transformation
Method (d) result of Logarithmic Transformation (e) result of LHE Method (f) result after applying
OBCS Method.
18
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
Fig.1 shows the Lena image and their resultant contrast enhancement versions. The various
methods are compared. Fig1 (a) demonstrates the original image. HE method enhances the
contrast which results in over illumination of the image. This situation is observed in Fig1 (b).
For Power Law Transformation, the foreground part of the image has improved but the hair of
Lena is not much improved which is shown in the Fig1(c). For Logarithmic Transformation, the
background as well as the foreground has over brightness look and is shown in Fig1 (d). An
image with improved contrast and without natural look is shown in Fig1 (e) in the case of Local
Histogram Equalization (LHE) method. The OBCS method preserves the brightness and also
improves the contrast, but the portions became more dark which is observed in Fig1 (f).
Fig2 shows the Photographer image and their corresponding contrast enhancement versions. The
various methods are compared. Fig2 (a) is the original image of photographer. HE method
enhances the image but results in over illumination as shown in Fig2 (b). By applying Power
Law Transformation method, the image is enhanced but a problem is observed in the background
portion as in Fig2(c). In Logarithmic Transformation Method, the foreground image is brightened
and background portion is damaged can be observed in Fig2 (d). In Local Histogram Equalization
method, the contrast is improved but brightness is not preserved. Hence the output image does not
give a natural look which is shown in Fig2 (e). The OBCS Method preserves the brightness and
also improves the contrast of the image but the dark portion became more dark. It is observed in
Fig2 (f).
lost
(e) (f)
Fig 2: Results for Photographer: (a) Original input Image (b) result of HE Method (c) result of Power Law
Transformation Method (d) result of Logarithmic Transformation (e) result after applying LHE Method
(f) result after applying OBCS Method.
Fig3 demonstrates the original input image and their corresponding contrast enhancement
versions. The different methods are compared. Fig3 (a) demonstrates the vegetables image. Over
illumination and better utilization of dynamic range of the pixel values is observed in the case of
HE method which is shown in Fig3 (b). By applying Power Law, the foreground brightness of the
vegetables increased is shown in Fig3(c). Logarithmic Transformation increases both foreground
and background parts of the image is shown in Fig3 (d).Contrast of the image is increased but the
image missing its natural appearance by applying LHE method is shown in Fig 3(e). When
19
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
compared to other methods OBCS preserves the brightness and enhancing the contrast of image,
which is observed in fig3 (f).
(e) (f)
Fig 3: Results for vegetables: (a) Original input Image (b) result of Image after applying HE Method (c)
result of Power Law Transformation Method (d) result after applying Logarithmic Transformation (e)
result of LHE Method (f) result after applying OBCS Method
(e) (f)
Fig 4: Results for Boy: (a) Original input Image (b) Enhanced Image of HE Method (c) result after
applying Power Law Transformation Method (d) Enhanced Image of Logarithmic Transformation (e)
result after applying LHE Method (f) Enhanced Image after applying OBCS Method.
20
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
Fig4 demonstrates the original input image Boy and their corresponding contrast enhancement
versions. The various methods are compared. Fig4 (a) is the original image with good contrast.
HE method enhances the image but enhancement more than the required level which is shown in
Fig4 (b). By applying Power Law Transformation method, the image is darkening as in Fig4(c).
Logarithmic Transformation increases both the foreground and background which can be
observed in Fig4 (d).Local Histogram Equalization increases the contrast but brightness is not
preserved, hence the output image does not give a natural look which is shown in Fig4 (e). The
OBCS Method preserves the brightness and also improves the contrast of the image. It is
observed in Fig4 (f).
Entropy is a statistical measure of randomness that can be used to characterize the input image.
Entropy is defined as
Entropy=sum (p.*log2 (p))
Where p contains the histogram counts returned from imhist.
The mean squared error of the estimator or predictor T(Y) for U is
MSE [T(Y); U] =E [(T(Y) – U) 2]
5. CONCLUSION
The method is applied on various types of images. The assessment is performed by using both
subjective and objective evaluation. Objective analysis has been performed using MSE and
Entropy. It is seen that mean square error is less using OBCS method for all images. The
subjective analysis shows that image has been improved in all the cases, but it can be observed
that in the good contrast images the background is growing more darken which will be the future
work of this research.
21
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
REFERENCES
[1] J. M. Gauch, “Investigations of image contrast space defined by variations on histogram
equalization,” in Proc. CVGIP: Grap. Models Image Process., Jul. 1992, pp. 269–280.
[2] J. A. Stark, “Adaptive image contrast enhancement usign generalizations of histogram equalization,”
IEEE Trans. Image Process., vol. 9, no. 5, pp. 889–896, May 2000.
[3] Y.Wang, Q. Chen, and B. Zhang, “Image enhancement based on equal area dualistic sub-image
histogram equalization method,” IEEE Trans. Consum. Electron., vol. 45, no. 1, pp. 68–75, Feb.
1999.
[4] H. Zhu, F.H.Y. Chan, F.K. Lam, “Image contrast enhancement by constrained local histogram
equalization,” Computer Vision Image Understanding, vol. 73, no. 2, pp. 281-290, Feb. 1999.
[5] Joung-Youn Kim, Lee-Sup Kim, and Seung-Ho Hwang, “An Advanced Contrast Enhancement using
Partially Overlapped Sub-block Histogram Equalization,” IEEE Transactions on Circuits and Systems
for Video Technology, vol. 11, no. 4, pp. 475-484, Apr. 2001.
[6] S. Mukhopadhyay and B. Chanda, “multiscale morphological approach to local contrast
enhancement,” Signal Processing, vol. 80, no. 4, pp. 685-696, 2000.
[7] R.C. Gonzalez, R.E. Woods, “Digital Image Processing,” 3rd edition, Prentice Hall, 2008.
[8] Abdullah-Al-Wadud,M., Kabir, Md. Hasanul., Dewan, M. Ali Akber. and Chae, Oksam.(2007) “A
DynamicHistogram Equalization for Image Contrast Enhancement” IEEE 2007
[9] N. Otsu, “A threshold selection method from grey-level histograms,” IEEE Trans. on Systems, Man
and Cyb., vol. 9, no. 1, pp. 41-47, 1979.
[10] Iyad Jafar ,and Hao Ying,” Multilevel Component-Based Histogram Equalization for Enhancing the
Quality of Grayscale Images”, IEEE EIT, pp. 563-568, 2007.
[11] K. Mardia and T. Hainsworth, “A spatial thresholding method for image segmentation,” IEEE Trans.
Pattern Anal. Machine Intell., vol. 10, pp.919–927, Nov. 1988.
[12] F. Meyer and S. Beucher, “Morphological segmentation,” J. Vis. Commun. Image Represent., vol. 1,
pp. 21–46, Sept. 1990.
[13] J. M. Gauch, “Image segmentation and analysis via multiscale gradient watershed hierarchies,” IEEE
Trans. Img. Proc., vol. 8, no. 1, Jan. 1999.
[14] L. Najman, “Geodesic saliency of watershed contours and hierarchical segmentation,” IEEE Trans.
Pattern Anal. Machine Intell., vol. 18, no. 12, pp. 1163-1173, Dec. 1996.
[15] K. Haris, S. N. Efstratiadis, N. Maglaveras, A. K. Katsaggelos, "Hybrid image segmentation using
watersheds and fast region merging," IEEE Trans. Image Processing, pp. 1684-1699, vol. 7, no. 12,
1998.
[16] D. Shen, M. Huang, “A watershed-based image segmentation using JND property,” IEEE Int. Conf.
Acoust. Speech Signal Process Proc. 3:377-380, 2003.
[17] S. E. Hernandez, K. E. Barner, and Y. Yuan, “Region merging using homogeneity and edge integrity
for watershed-based image segmentation,” Opt. Eng., vol. 44, 2004.
[18] X. C. He, R. H. Y Chung and N. H. C. Yung “Watershed segmentation with boundary curvature ratio
based merging criterion,” Proceedings of IASTED International Conference on Signal and Image
Processing, pp. 7-12, 2007.
[19] N. Pal, S. Pal, “A review on image segmentation techniques,” Pattern Recognit., vol. 26, pp. 1277–
1294, 1993.
[20] J. -L. Stark, F. Murtagh, E. J. Candes and D. L. Donoho, “Gray and color image contrast enhancement
by curvelet transform,” IEEE Transactions on Image Processing, vol. 12, no. 6, 2003.
[21] A. Khellaf, A. Beghdadi, H. Dupoisot, “Entropic contrast enhancement,” IEEE Trans. Medical
Imaging, vol. 10, no.4, 1991.
[22] Aditi Majumder, Sandra Irani, “Perception Based Contrast Enhancement of Images,” ACM
Transactions on Applied Perception, vol. 4, no. 3, Article 17, Jul. 2007.
[23] P. G. Barten, “Contrast sensitivity of the human eye and its effects on image quality,” SPIE - The
International Society for Optical Engineering, P.O. Box 10 Bellingham Washington, ISBN 0-8194-
3496-5, 1999.
[24] Dr. A. Sri Krishna,G. Srinivasa Rao,M.Sravya “Contrast enhancement techniques using Histohram
Equalization methods on color images with poor lightning” International Journal of Computer
Science, Engineering and Applications (IJCSEA) Vol.3, No.4, August 2013
22
International Journal of Advanced Information Technology (IJAIT) Vol. 4, No. 3, June 2014
Authors
Dr. A. Sri Krishna received the PhD degree from JNTUK, Kakinada in 2010, M.Tech
degree in Computer Science from Jawaharlal Nehru Technological University (JNTU)
in 2003, M.S degree in software systems from Birla Institute of Technology and
Science, Pilani in 1994, AMIE degree in Electronics & communication Engineering
from Institution of Engineers, Kolkata in 1990. She has 23 years of teaching experience
as Assistant Professor, Associate Professor, Professor and presently she is working as a
Professor and Head, Dept of Information Technology at RVR&JC College of
Engineering, Guntur. She has published 15 papers in International/ National Journals
and Conferences. Her research interest includes Image Processing and Pattern Recognition. She is member
of IE(I) and member of CSI.
Dr. S.Mahaboob Basha did his B.E.(Electronics) from Bangalore University, M.Tech.
from JNTU Anantapur and Ph.D. from S.K.University, Anantapur. He worked in
S.K.University in the Dept. Computer Science & Technology and in Wipro
Technologies, Bangalore. He has 21 years of teaching and 2 years of industrial
experience. He has 6 years of research experience. He is an expert in java technologies
and has delivered many guest lectures in various universities/colleges on Java, VC++,
Software Engineering, Data Structures and DBMS. His areas of interest in research are:
Image Compression, Image Filtering, Steganography, Network Security and Bio-Medical Engineering. He
has published 10 papers in reputed national and international journals. He is the life-time member of ISTE
CH.Jeevan Prakash did his B.Tech Graduation in Information Technology, in RVR & JC
College of Engineering, Chowdavaram, Guntur Andhra Pradesh, under ANU university
India. He has been actively participating and presenting papers in student technical
Symposium seminars at National Level. Her area of interest includes Image Processing,
web technologies.
23