Anda di halaman 1dari 5

IMAGE QUALITY ENHANCEMENT AND EDGE DETECTION USING

OPEN CV
PAVITHRA B H
PG Student, ECE Department, DBIT, Bangalore, Karnataka, India
pavithrabh.4@gmail.com

SHUBHA G N
Asst prof, ECE Department, DBIT, Bangalore, Karnataka, India
shubhagn24@gmail.com

ABSTRACT: During the capture of an image, various problems like non uniform illumination,
blurring due to shaking etc may occur resulting in a bad image. To overcome these types of
problems various techniques like histogram equalization, edge detection and morphological
operations are used. This paper deals with rectifying these problems and enhancing the image with
high contrast. This can be used for applications like image analysis, photograph editing and
analysis of biological images for particle/object analysis etc .We use Open CV software for the
implementation purpose.

KEYWORDS: Canny edge detection, Histogram Equalization, Morphology, Weiner filter, Open CV

INTRODUCTION

Poor lighting, blurry pictures, cameras not having decent resolution, non uniform illumination due
to aging filaments, faulty reference voltages etc may result in poor quality images. In this paper we
try to enhance the image with high contrast and good quality appearance and detect the edges of
the image. We use morphological operations, histogram equalization, linear filtering, and edge
detection techniques for improving the image quality. Photography, satellite imagery, medical
applications, display devices, sending and receiving data through fax, object detection, target
tracking, segmentation are some of the applications where above methods can be used.[2]
Representing data in group or in certain ranges by using bars of different height in a graphical
display is known as histogram.Edge detection is the first step in segmentation and other image
analysis techniques.Edge detection using canny filter is done.In canny edge detection to detect a
wide range of edges in image, a multistage algorithm is used in edge detection operator. In 1986,
John.F.Canny developed this canny filter. [3]J.Serra and G.Matheron developed a set theory
approach called mathematical morphology. These set operations are performed based on
Minikowski addition and subtractions. Erosion and dilation are two fundamental operations.
Mathematical morphology is a method used for analysis and processing of geometrical structure
like size, shape, convexity, geodesic distance etc. A pattern called structuring element is used to
modify the original image.The structuring element is given as input and output is obtained of same
size.Every pixel in the structuring element is compared with its neighboring pixels.[1] A
framework is proposed for background detection in images having poor contrast. An enhancement
of image is been carried using the framework. Initial method includes collecting information from
background analysis. Using histogram equalization, edge detection algorithm. While next method
includes opening operation, closing operation using morphology to define multi background
grayscale images. For image sharpening and morphological operation ,linear filter like wiener
filter is used in image enhancement.Open CV software is used for complete image
processing.With the help of morphological functions, various tasks like thinning, filling,noise
removal, segmentation, skeletonization can be performed. In local context, global properties of
images cannot be applied properly.This is main disadvantage in histogram equalization which
produces ineffective performance in storing required details.

METHODOLOGY

For detecting boundaries and enhancing contrast of images, techniques such as canny edge
detection, histogram equalization and morphological operations have been studied. An image with
the presence of non uniform illumination, algorithm on morphological opening and structuring
element design are studied in order to reduce problems regarding non uniform background
illumination and background approximation techniques.

HISTOGRAM EQUALIZATION

Histogram Equalization is a technique used to enhance the contrast of an image by adjusting image
intensity into wider range of uniform distribution of intensity values. Under HE, the lighter part of
an image becomes more lighter and darker part becomes more darker .Here a threshold value of
pixel is fixed. Any pixel above threshold value is made white color and below threshold value is
made black color which results in linear mapping of a subset of pixel values. An image which is
processed using HE and its contrast enhanced image is shown below.

Fig 1: Original image Histogram equalized image

With a predefined pixel value, the technique compares each pixel in the given input image and sets
all pixel values which are below threshold value to be as zero or black color and pixels which are
above threshold value is set as one or white color. The technique enhances the image making it
easy to see the details more clearly which can be done by increasing the dynamic range of overall
histogram.

EDGE DETECTION

Edge detection is a technique used in image processing to identify the boundaries of particles or
objects within images. Canny, Sobel, Prewitt, Roberts and fuzzy logic are some of the common

299
edge detection algorithms. In canny edge detection, a multistage algorithm is used in edge
detection operator to detect a wide range of edges in images. The canny edge detection algorithm
is also known as optimal edge detector.The edges are marked in places where intensity changes
rapidly .Using the criteria: where the magnitude of the first derivative is larger compared to some
fixed value and where the intensity has a zero crossing in second derivative .During the
implementation, the general criteria expected are as follows:
Error rate should be as low as possible, as many as possible edges should be detected.
The operator should detect the edge point, locating accurately on the center of the edge.
Edges should not be marked repeatedly. Noise should be reduced to avoid false edges.

Applying canny edge detector for the given image, resulting edge detected image is shown below.

Fig 2: original image Edge detected image

The above images show the effective edge detection with the use of linear filtering approach.

MORPHOLOGY

Collecting non linear operations which are related to size, shape and other morphological features
of an image is known as morphological image processing. Due to distortion by noise and texture,
the binary images may contain many imperfections. The aim of morphological processing is to
remove these imperfections. A structuring element with a small shape or template is probed in this
technique. It is a small matrix of pixel having zero or one values. Structuring element is applied as
input image and output image is obtained with same size. Erosion and dilation being basic steps in
morphology have been studied. In dilation, pixels are added to the boundaries of objects in the
given image while in erosion, pixels are removed at boundaries of object. Erosion followed by
dilation is known as opening and dilation followed erosion is known closing.

IMPLEMENTATION

The software used for image analysis is Open CV. Developed by Intel; it is an open source
computer vision library. It runs on Mac OS X, Windows and Linux and main focus is towards real
time image processing. An algorithm is proposed to obtain an enhanced image and with high
contrast. A structuring element is probed with similar size and shape of particles present in the
image. The structuring element is taken as input and morphological opening and closing is

300
performed. To determine the close proximity, background approximation has been taken as a
criteria Boundary tracing is carried out by morphological closing and pixel matrix. Histogram
processing is done by predefined threshold pixel value to enhance contrast throughout the image.
Linear filters like wiener filter are used to remove non uniform illumination and sharpening the
image. To improve the image contrast thresholding is been carried at the end.

Algorithm

Structuring element is probed

Read input image

Morphological operations like opening and


closing is done

Background estimation of the image

Obtaining enhanced image using


morphology

Boundary tracing using closing and pixel


matrix

Histogram equalization processing

Linear filtering and thresholding

Obtain enhanced image with high contrast

CONCLUSION AND FUTURE WORK

Contrast enhancement and boundary detection is shown using Histogram Equalization and edge
detection respectively. In future it is plan to enhance the image with still more good clarity using

301
morphological operations to correct non uniform illumination, then use it for particle or object
analysis.

REFERENCES

Rajwant kaur, Sukhpreet kaur Object Extraction and Boundary Tracing Algorithms for Digital
Image Processing: Comparative Analysis: A Review Volume 3, Issue 5, May 2013 ISSN:
2277 128X.
Komal Vij,et al. Enhancement of Images Using Histogram Processing Techniques Vol 2 ,
pp309-313, 2009.
M. Kowalczyk,et al.Application of mathematical morphology operations for simplification and
improvement of correlation of images in close-range photogrammetry,pp153-158, 2008.
Przemysaw Kupidur,Semi-automatic method for a built-up area intensity survey using
morphological granulometry,pp271-277, 2010.
David Menotti,Contrast Enhancement in Digital Imaging using Histogram Equalization ,pp1-85,
2008.
Joanna Sekulska,et al. Digital image processing methods in biological structure recognition a
short review,pp24-27, 2006.
Yadong Wu,et al.An Image Illumination Correction Algorithm based on Tone Mapping, IEEE
pp245-248, 2010.
Kevin Loquin,et al. Convolution Filtering And Mathematical Morphology On An Image:
AUnified View, pp1-4, 2010.

302

Anda mungkin juga menyukai