RUAS-SASTech Journal 21 Vol. 15, Issue 02 Improved Connected Component Algorithm Using Run-based Approach *Divya Kiran and Hariharan Ramasangu Department of Electronic and Communication Engineering, Faculty of Engineering and Technology, Ramaiah University of Applied Sciences, Bengaluru- 560058 *Contact Author E-mail : divyakiran.ec.et@msruas.ac.in Abstract Connected Component Labelling (CCL) is an algorithm to separate connected groups. CCL detects the connected regions in an image and provides information about an image.Different CCL algorithm has been developed with a goal of less computation, complexity and more accuracy. CCL finds its widestapplications based on image processing such as object detection.In this paper, an improved CCL algorithm has been proposed and compared with Stefano-Bulgarelli(SB) Algorithm and improved Stefano-Bulgarelli Algorithm. The proposed approach utilizes a novel way of labelling the connected components using mathematical relations, reducing computational complexity. The proposed algorithm has been used to obtain the information related toconnected regions with less computations. Obtained results show that proposed algorithm is more accurate in obtaining numbers of the connected regions than Stefano-Bulgarelli(SB) Algorithm and improved Stefano-Bulgarelli Algorithm. Key Words: Connected Component, Run-Length, Blob Detection, FPGA 1. INTRODUCTION Connected Component Labelling finds its utility in various applications of image processing, computer vision, etc. Object detection is the most common application where CCL is used [1]. CCL can be defined as the algorithm labelling the vertices based on the connectivity and relative values of their neighbours. Connected components are labelled using the concept of equivalence classes of an equivalence relation that is defined by the vertices of the graph [2]. CCL algorithms involves raster scanning and label equivalence method. Raster-scan is the method of scanning in a rectangular manner one row at a time [1]. Fig. 1 Raster Scanning In raster scanning as shown in Fig.1, the scan starts from the first column of row and ends at the last column then again starts from the first column of the next row. Raster-Scan provides the information of previous row but information of the next column in the same row or next row is not known. For the ease of analysis, binary image is preferred over RGB image for CCL. From the image, connected regions are identified as “Object”. It is also called binary large object (blob) which is a large cluster of connected pixels [3]. In this paper, a modified CCL algorithm has been proposed, and centroid and area of connected regions have been obtained. The rest of the paper is structured as follows: section II deals with the survey of different approaches of CCL algorithms, section III outlines the proposed algorithm and its implementation, and the results are discussed in section IV. 2. DIFFERENT APPROACHES OF CCL Classical algorithm approach performs two raster scans of image or matrix. In the first scan the neighbourhood between pixels are identified and temporary labels are assigned. During the first scan, equivalent labels are stored into equivalence classes. In the second scan, temporary labels are replaced by equivalent labels. Neighbourhood can be identified using 8-connectivity or 4- connectivity. This paper only accounts 4- connectivity neighbourhood. Fig. 2 Pixel Neighbourhood For an image ‘I’, foreground pixel is ‘F’ i.e. ‘1’ and ‘B’ is the background pixel i.e. ‘0’. Let ‘p’ be the pixel under scan, ‘a’ be the immediate vertical neighbour and ‘b’ be the immediate left neighbour of ‘p’ as shown in Fig. 2. The labelled neighbour ‘N’ is given by (a, b). NF = N∩F, where NF is foreground labelled pixel. Classical or general CCL algorithm depicts five conditions needed to be checked while labelling: 1. If ‘a’ and ‘b’ are empty then ‘p’ has a new label. 2. If ‘a’ is ‘F’ and ‘b’ is empty then label (p) = label (a).