Professional Documents
Culture Documents
net/publication/280244771
CITATIONS READS
5 250
4 authors, including:
Kanchan Verma
International Institute of Information Technology, Bhubaneswar
4 PUBLICATIONS 81 CITATIONS
SEE PROFILE
All content following this page was uploaded by Saumya Ranjan Giri on 22 March 2018.
I. INTRODUCTION
Image Segmentation is a vital step for character
extraction in the popular and widely used License Plate
Recognition System for vehicles. Thresholding, edge
detection, connected components labeling and watershed
transformations form the widely used categories in image Figure 1. Input binary image with two connected components
segmentation. Out of this connected component analysis (top) and the separated connected components (bottom).
is a relatively simple approach to isolate regions of
interest in an image. Medical Imaging and Industrial We make a general statement as follows:
applications widely use this approach to identify dark Input: Given a 2D binary image with N connected
objects in an image against a dark background. components.
Coloured digital images can be converted into a binary Output: N images with reduced dimensions containing
form that shall retain all the essential details. We assume each connected component as in the input.
that the regions of interest are denoted as dark regions Each image can further be analyzed using optical
(black pixels or logical 0) against a white background character recognition. To elucidate further
(white pixels or logical 1).The regions of interest if mathematically, consider a segmented binary image M of
extracted accurately from a binary image can be used r disjoint regions Mi as in Equation (1). M consists of
further for pattern recognition and analysis. foreground objects and a background.
Given a binary image with two connected components We denote the background as the set of white pixels
as shown in Figure 1, our objective is to find two sub- and the foreground as the set of black pixels where the
images that contain the individual connected components superscript ‘c’ denotes the complement set of .Thus we
as shown in Figure 1 on the bottom. have,
P. Kumar, S. R. Giri, G. R. Hegde and K. Verma / IJECCT 2012, Vol. 2 (2) 28
To find the connected components, we define the pixel The Neighbors-scan labeling approach also requires a
connection in terms of neighbourhoods. The single pass through the image [9].This approach can also
neighbourhood of a pixel is the set of pixels in an image capture essential characteristics of the connected
that it touches. Consider pixel P1 as shown below in components like size, position and bounding rectangle.
Figure 2 with its eight neighbors P2, P3……P9.The The labeling algorithms also resolve label equivalences on
equivalent 2D matrix coordinates in shown at the bottom a region when merging with the neighbors of interest as
of Figure 2. described in [11].
Thus we can define set Ф of pixels to be a connected A majority of these algorithms give great results in
component if there is at least one path in Ф that joins terms of accuracy and faster execution time. Our
every pair {u, v} of pixels in Ф. The path must contain endeavour has been to give another simple and accurate
pixels in Ф. approach to find connected components in a binary image
The paper is divided into following sections. Section II for the application of License Plate Recognition System
highlights some of the previous work done on connected using “tree” data structure. We call our algorithm
components. Section III and Section IV discuss the “SAGAP” which means a “fishing net” in Itbayaten
illustration of our proposed algorithm and the algorithm language spoken in Western Philippines. We are
respectively. Section V discusses the conclusion and interested in netting all black pixels from the image ‘sea’
future work possible. that make a connected component!
Figure 2. 8-neighbourhood of pixel P1 (top) and equivalent 2D Figure 3 represents two different connected
matrix coordinate representation (bottom). components as black pixels in a binary image along with
their co-ordinates. The dashed arrows show the direction
of scanning. Connected component-1 consists of black
II. PREVIOUS WORK DONE ON CONNECTED pixels at (7, 3), (8, 3), (7, 4) and (9, 4) co-ordinates.
COMPONENTS Connected component-2 consists of black pixels at (3, 4),
A lot of work has be done successfully in this area over (3, 5) and (4, 5) co-ordinates.
the past four decades starting with the classic connected
A. Generation of tree
components labeling algorithm [1,2].It required O(n3)
time to sequentially label regions in a binary image two- While scanning we hit the first black pixel at co-
raster scan passes through the image [11]. ordinate (7, 3). So we create a node and store the
FPGA implementation has been well established using corresponding row and column value i.e. 7 and 3.
a preprocessing step without buffering the image and
using a stream based processing [10].This process is a
parallel algorithm requiring two passes while the single-
pass FPGA [2] implementation uses a single-pass only.
Single pass algorithms focus on merging regions of
interest and relabeling in the same step to avoid the
second pass.
P. Kumar, S. R. Giri, G. R. Hegde and K. Verma / IJECCT 2012, Vol. 2 (2) 29
Now these new co-ordinate values will be filled with column value of the neighbourhood
black pixels and a new image will be created from that black pixel.
matrix. II. Set Bottom.Down = Temp node.
III. Set Bottom node = Temp node.
Similarly a new image will be constructed for the e. Repeat from Step- 4(c) to Step- 4(d) for every
second connected component. 8-neighbourhood black pixel.
5. End if
The final result will be in the form of two separate
6. If (Start node = null)
images as shown below.
Set Start node = Top node. Set Root = Top
node.
Else
Set Start. Right = Top node.
Set Start node= Top node.
7. End if
8. Repeat from Step-3 to Step-6 until every black
pixel of the matrix is visited.
9. Set Current = Root.
Figure 12. The separated connected components
10. Set Bottom = Current. Down.
III. The SAGAP Algorithm 11. Set Next = Current. Right.
The final algorithm of SAGAP to find the connected 12. Do
components in a binary image is presented below. If (Bottom.row = Next.row) AND (Bottom.col =
Next.col)
1. Read the binary image and store it in a matrix. a. Set Temp = Next. Set Next = Next.
2. Set Start node= Null. Set Root = Null. Down.
3. Read the matrix either row wise or column wise. Set Current. Right= Next. Set Next.
4. If (black pixel found) Right=Temp.Right. Delete node
a. Create a node (Top node) and store Temp.
corresponding row and column value in that b. Compare all nodes of Current with all
Top node. nodes of Next.
b. Set Bottom node = Top node. c. If (matched)
d. Delete the duplicate node from Next and
link accordingly.
e. Join the remaining nodes (unmatched) of
Next with Bottom and Set Current.
Right=Next. Right.
Else
algorithm on fifty binary images of vehicles in Indian [4] Rafael C. Gonzalez and Richard E. Woods, “Digital Image
Processing”, Second Edition , Prentice Hall India,2006.
conditions of dimensions 3648 X 2736 pixels with
[5] Milan Sonka, Vaclav Hlavac and Roger Boyle, “Digital Image
connected components and found the algorithm to be Processing and Computer Vision”,Cengage Learning, India
100% accurate with the average execution time of 1 to 1.5 Edition,2008
seconds. The testing was done using a Intel® Core™2 Duo [6] Alasdair McAndrew, “Introduction to Digital Image Processing
with MATLAB®”, Cengage Learning, India Edition,2004.
CPU with speed 2.20 GHz having 3GB RAM. The
[7] Yang, X.D., “An Improved Algorithm for Labeling Connected
algorithm is a tad slower than some algorithms but Components in a Binary Image,” TR 89-981,March 1989.
nonetheless gives outstanding results. In the future we are [8] Tetsuo Asano and Hiroshi Tanaka, "In-place Algorithm for
interested to make the execution time faster so that it can Connected Components Labeling", Journal of Pattern
Recognition Research 1 (2010) 10-22.
be exploited further not only for this applications but also
[9] Akmal Rakhmadi,N.Z.S Othman,Abdullah Bade,Mohd Shafry
for other real-time applications in image processing. Mohd Rahim and Ismail Mat Amin, "Connected Component
Labeling Using Components Neighbors-Scan Labeling
REFERENCES Approach",Journal of Computer Science 6 (10):1070-1078,2010.
[10] Jablonski, M., Gorgon, and M., "Handel-C implementation of
[1] A. Rosenfeld and J. Plaftz, “Sequential operations in digital classical component labelling algorithm", in Euromicro
picture processing”, Journal of the ACM, 13(4), 471- 494 Symposium on Digital System Design (DSD 2004), Rennes,
(1966). France, 387-393 (2004).
[2] Christopher T Johnston and Donald G Bailey, “FPGA [11] Jung-Me, P., C.G. Looney and C. Hui-Chuan, 2000, "Fast
Implementation of a Single Pass Connected Components connected component labeling algorithm using a divide and
Algorithm”, 4th IEEE International Symposium on Electronic conquer technique", Proceeding of the Conference on Computers
Design, Test & Applications,229-231 (2008). and their Applications, Mar. 29-31, ISCA, New Orleans, USA.,
[3] Fu Chang and Chun-Jen Chen, "A Fast Method for Labeling pp: 373-376.
Connected Components in an image",16th IPPR Conference on
Computer Vision, Graphics and Image Processing (CVGIP
2003).