APPLICATION OF FLOYD-WARSHALL LABELLING TECHNIQUE: IDENTIFICATION OF CONNECTED PIXEL COMPONENTS IN BINARY IMAGE. Hyunkyung Shin and Joong Sang Shin

Similar documents
Two Image-Template Operations for Binary Image Processing. Hongchi Shi. Department of Computer Engineering and Computer Science

Research Article Image Segmentation Using Gray-Scale Morphology and Marker-Controlled Watershed Transformation

Solutions to Problem 1 of Homework 3 (10 (+6) Points)

Code Transformation of DF-Expression between Bintree and Quadtree

Single Pass Connected Components Analysis

CS 5540 Spring 2013 Assignment 3, v1.0 Due: Apr. 24th 11:59PM

Fault-Tolerant Routing Algorithm in Meshes with Solid Faults

Image segmentation via graph cuts with connectivity priors

Skeletonization Algorithm for Numeral Patterns

NUMERICAL COMPUTATION METHOD OF THE GENERAL DISTANCE TRANSFORM

Segmentation and Modeling of the Spinal Cord for Reality-based Surgical Simulator

Small-scale objects extraction in digital images

Total Points: 60. Duration: 1hr

END-TERM EXAMINATION

DESIGN AND ANALYSIS OF ALGORITHMS

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations II

A Connected Component Labeling Algorithm for Grayscale Images and Application of the Algorithm on Mammograms

Image Processing. Bilkent University. CS554 Computer Vision Pinar Duygulu

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

MODIFIED SEQUENTIAL ALGORITHM USING EUCLIDEAN DISTANCE FUNCTION FOR SEED FILLING

The Unified Segment Tree and its Application to the Rectangle Intersection Problem

Symbol Detection Using Region Adjacency Graphs and Integer Linear Programming

International Journal of Advance Engineering and Research Development. Applications of Set Theory in Digital Image Processing

Comparison between Various Edge Detection Methods on Satellite Image

Pictures at an Exhibition

Communication Networks I December 4, 2001 Agenda Graph theory notation Trees Shortest path algorithms Distributed, asynchronous algorithms Page 1

EE 584 MACHINE VISION

FABRICATION ANALYSIS FOR CORNER IDENTIFICATION USING ALGORITHMS INCREASING THE PRODUCTION RATE

5. Connected-component labeling

An explicit feature control approach in structural topology optimization

Hybrid filters for medical image reconstruction

Shortest Path Algorithm

An adaptive container code character segmentation algorithm Yajie Zhu1, a, Chenglong Liang2, b

Fast Distance Transform Computation using Dual Scan Line Propagation

CS521 \ Notes for the Final Exam

Image Segmentation. 1Jyoti Hazrati, 2Kavita Rawat, 3Khush Batra. Dronacharya College Of Engineering, Farrukhnagar, Haryana, India

Shortest Path Routing on Multi-Mesh of Trees

3D Grid Size Optimization of Automatic Space Analysis for Plant Facility Using Point Cloud Data

Pathfinding Algorithms and Implementations on Grid Map

Imaging Sensor with Integrated Feature Extraction Using Connected Component Labeling

A New Algorithm for Detecting Text Line in Handwritten Documents

Induced-universal graphs for graphs with bounded maximum degree

COLOR AND SHAPE BASED IMAGE RETRIEVAL

Virtual University of Pakistan

Hierarchical Representation of 2-D Shapes using Convex Polygons: a Contour-Based Approach

Image Segmentation for Image Object Extraction

EE 701 ROBOT VISION. Segmentation

Fast and Robust Earth Mover s Distances

Chapter 9 Graph Algorithms

A Methodology to Detect Most Effective Compression Technique Based on Time Complexity Cloud Migration for High Image Data Load

A FUZZY LOGIC BASED METHOD FOR EDGE DETECTION

A Method for Lossless Compression of Images

An Adaptive Approach for Image Contrast Enhancement using Local Correlation

Chapter 9 Graph Algorithms

CIS UDEL Working Notes on ImageCLEF 2015: Compound figure detection task

Processing of binary images

A Symmetry Operator and Its Application to the RoboCup

Recognition of Unconstrained Malayalam Handwritten Numeral

Copyright Detection System for Videos Using TIRI-DCT Algorithm

Increasing interconnection network connectivity for reducing operator complexity in asynchronous vision systems

An ICA based Approach for Complex Color Scene Text Binarization

Lecture 10: Semantic Segmentation and Clustering

Introduction. Computer Vision & Digital Image Processing. Preview. Basic Concepts from Set Theory

A Distributed Approach to Fast Map Overlay

An Introduction to Images

Multi-scale Techniques for Document Page Segmentation

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

1. Basic idea: Use smaller instances of the problem to find the solution of larger instances

6. Dicretization methods 6.1 The purpose of discretization

Reliability Measure of 2D-PAGE Spot Matching using Multiple Graphs

Two-dimensional Totalistic Code 52

Erosion, dilation and related operators

Fast K-nearest neighbors searching algorithms for point clouds data of 3D scanning system 1

Topic 5: Raster and Vector Data Models

: Principles of Imperative Computation Victor Adamchik. Practice Exam - I

Layout Segmentation of Scanned Newspaper Documents

Keywords Binary Linked Object, Binary silhouette, Fingertip Detection, Hand Gesture Recognition, k-nn algorithm.

An Optimized Computational Technique for Free Space Localization in 3-D Virtual Representations of Complex Environments

Egemen Tanin, Tahsin M. Kurc, Cevdet Aykanat, Bulent Ozguc. Abstract. Direct Volume Rendering (DVR) is a powerful technique for

From Pixels to Blobs

Lecture 9: Group Communication Operations. Shantanu Dutt ECE Dept. UIC

VC 10/11 T9 Region-Based Segmentation

Triangular Mesh Segmentation Based On Surface Normal

Detection of objects in moving images and implementation of the purification algorithm on Analog CNN and DSP processors

Three Dimensional Motion Vectorless Compression

Use of Local Minimization for Lossless Gray Image Compression

New Removal Operators for Surface Skeletonization

Chapter 3. Image Processing Methods. (c) 2008 Prof. Dr. Michael M. Richter, Universität Kaiserslautern

Research on an Adaptive Terrain Reconstruction of Sequence Images in Deep Space Exploration

Fall 2007, Final Exam, Data Structures and Algorithms

Image Filtering with MapReduce in Pseudo-Distribution Mode

09/11/2017. Morphological image processing. Morphological image processing. Morphological image processing. Morphological image processing (binary)

Binary Image Processing. Introduction to Computer Vision CSE 152 Lecture 5

K-Means Clustering Using Localized Histogram Analysis

Computer and Machine Vision

A Document Image Analysis System on Parallel Processors

An Efficient Character Segmentation Based on VNP Algorithm

A Proposal for the Implementation of a Parallel Watershed Algorithm

Introduction to Parallel & Distributed Computing Parallel Graph Algorithms

Vertex Magic Total Labelings of Complete Graphs 1

Transcription:

Kangweon-Kyungki Math. Jour. 14 (2006), No. 1, pp. 47 55 APPLICATION OF FLOYD-WARSHALL LABELLING TECHNIQUE: IDENTIFICATION OF CONNECTED PIXEL COMPONENTS IN BINARY IMAGE Hyunkyung Shin and Joong Sang Shin Abstract. This paper presents an image analysis technique using connected components by applying SPA (shortest path algorithm) from graph theory. Software implementation of Floyd-Warshall transitive matrix labelling method is discussed. Results are also presented. 1. Introduction Image segmentation is a generic term for separation between an object and background material residing in an image. The primary purpose of segmentation is to remove undesirable artifacts from bonafide object components in the image[12]. As the elementary exemplar tools for image segmentation, various threshold techniques and boundary/edge detection methods are proposed [4]. In practice, nonetheless, labelling is a primary segmentation method so that each object labelled differently can be analyzed separately. However, its negative aspect is operational ineffectiveness due to complexity of underlying labelling algorithm. Reducing operational complexity of the algorithm is of great importance. Connected components of vertices using labelling method is a fundamental concept in graph theory appeared first in [10]. Its definition states as follows, Definition 1.1. In an undirected graph, a connected components is a maximal connected sub-graph. Two vertices are in the same connected components if and only if there exists a path between them. Received December 26, 2005. 2000 Mathematics Subject Classification: 68R10, 68U10, 90C35. Key words and phrases: Image Processing, Image Analysis, SPA, Connected Components. * Corresponding author

48 Hyunkyung Shin and Joong Sang Shin A path between two vertices u and v, appeared in Definition 1.1, represents a set of edges starting from u and ending to v if it exists. Path in graph can be formalized in algebraic terms. Definition 1.2. In an undirected graph, the existence of path between two vertices u and v is an equivalence class. Image is a two dimensional array of pixels, where pixel is abbreviation of picture element. Pixel is an unit of picture representation in a computer memory, typically has one (Gray), three (RGB color) or four dimensions (Printing devices). Each dimension of pixel usually takes 1 (document, photo) or 2 (medical, GPS) bytes. In binary image, pixel has one dimension and only two pixel values are available, black(1) and white(0). Definition 1.3. Two dimensional binary image having size of width, w, and height, h, can be written as a {0, 1} X, where X indicates w h grid. a(i, j) indicates the pixel value at i-th column and j-th row of image array a. There are two types of connectivity which defines topology of neighborhood from a pixel: 4-connectivity (North, West, South, East) and 8-connectivity (N, NW, W, SW, S, SE, E, NE). Neighborhood of a pixel y, N(a)(y) is formulated in Definition 1.4, for details refer to[10], Definition 1.4. [N(a)] 4 (y), [N(a)] 8 (y) represent 4- and 8- connected neighborhood of y, respectively. [N(a)] 4 (y) = {y} {x x = y + (0, i) or y + (i, 0) : a(x) 0, i = 1 or 1} [N(a)] 8 (y) = {y} {x x = y + (i, j) : a(x) 0, i, j = 1 0 1} Two pixels in an image are connected if there exists a recursive path of neighborhood pixels to the other pixels. Existence of path needs to be formalized mathematically, With the configurations described

Application of Floyd-Warshall labelling technique 49 above, it is obvious that connected components in a binary image can be well-defined. Component labelling is originated from the algorithm by Rosenfeld and Pfalz[11]. The algorithm performs in two steps: the first pass initializes the labels for each component, and the second pass finds equivalent labels to merge into one. As an application of the labelling algorithm to image analysis, image labelling problem is to uniquely label all of the connected components in an image. Several researchers[7, 6, 8] drew attention a structural problem for the second pass when input image is huge. In worst case, the size of equivalence array can be out of range. The various efforts to resolve the problem in identifying equivalence labels have been attempted. To resolve physical memory problem, parallel algorithms have been proposed [1, 2, 13]. For a comparative survey of the parallel algorithms for image labelling, refer to [5]. A serial algorithm, use a bracket table to associate equivalent set in [14], or grow connected components from a seed pixel in [8], or trace the boundaries of connected components in [3]. In this paper, we develop a fast and serial connected pixel components algorithm in binary image by applying Floyd-Warshall SPA. In 2 the details of algorithm implementation is discussed. In 3 the results and discussions are presented. 2. Implementation of Algorithm Our algorithm using Floyd-Warshall transitive matrix performs in three steps: Step 1, image labelling in first pass throughout image from top to bottom and left to right, Step 2, set up transitive matrix in second pass throughout image from bottom to top and left to right, Step 3, merge labels without referencing image. In step 1, each black pixel in an input image of size w h, a(i, j), will be visited from top to bottom and left to right. for j = 0 h for i = 0 w label a(i, j)

50 Hyunkyung Shin and Joong Sang Shin Fig. 1. As a typical result of initial labelling, a component can have multiple labels due to top-bottom, left-right directional partiality while pixel sweeping. where the label function performs labelling for each black pixels in image. The functionality of label is as follows, if a(i, j) = 0(white) then skip, or if a(i, j) = 1(black) then do labelling. Details of labelling procedure are described as follows: if a(i 1, j) = 1 then use the label assigned at (i 1, j), else if a(i 1, j 1) = 1 then use the label assigned at (i 1, j 1), else if a(i, j 1) = 1 then use the label assigned at (i, j 1), else if a(i 1, j+1) = 1 then use the label assigned at (i 1, j+1), else if no labelled neighbor found, then assign new label value to I(i, j) Refer to Fig. 1 for typical problem occurring in the initial labelling described above. At the position (2, 1), the algorithm has no information whether the (labelled) pixel at (1, 3) is connected to it. Once the initial labelling is completed, an image labelled, I, is produced. In order for resolving the case of multiple labels in a connected components as seen in Fig. 1, in this step 2, a transitive matrix, T, will be constructed in the manner described as the following. For pixel

Application of Floyd-Warshall labelling technique 51 sweeping, in order to resolve directional partiality, take the reverse order as oppose to the order used in step 1, i.e., from bottom to top, right to left. if I(i, j) = 0 then skip, or else check neighborhood label to see whether different label value is assigned In case a component contains the multiple labels, for example, if two pixels with label 1 and 2, resp, are turned out to be connected each other and two pixels with label 2 and 4 are also connected in the same components, a transitive matrix T can be constructed in the manner described as below. 1 0 0 0 1 1 0 0 T = 0 0 1 0 0 1 0 1 Transitive closure will be then applied to the transitive matrix. In order for enhancing operational simplicity, we modified the typical transitive closure process which is demonstrated as follows, for j = h 0 for i = w j ( ) if a(i, j) 0 for k = 0 h a(i, k) = a(j, k) a(j, k) = a(i, k) The step ( ) in above formula reduces the complexity of algorithm from O(n 3 ) to O(n 2 log(n)). Additionally, notice the reverse ordering in this second pass sweep. After transitive closure, the matrix T becomes 1 1 0 1 1 1 0 1 T = 0 0 1 0 1 1 0 1

52 Hyunkyung Shin and Joong Sang Shin Fig. 2. Connected component algorithm run on characters in document image acquired from scanner. Bounding boxes were added for better visualization of the result. In step 3, duplicated labels in a connect components will be merged to a unique label. For the clarity of understanding, in transitive matrix, the row indicates original label from initial labelling and the column indicates new label. As for an example, in the matrix T, T (2, 1) = 1 implies that originally assigned label 2 will be merged to label 1. Since the step 3 is trivial, our algorithm is similar to the original labelling algorithm in [11]. 3. Results and Discussion The algorithm was implemented using C# language of.net framework 2003 and run on sample images. The test images were loaded into two dimensional pixel array by GDI+ in.net. Fig. 2 illustrates an example of connected components identified in image. For the purpose of visualizing connected components, rectangular bounding boxes for each individual connected components are displayed. From the figure, we can distinguish between the connected pixels in characters and the isolated characters. Small bounding boxes appeared on top of char O (within Los ) in Fig. 2 are due to isolated artifacts of the character. This proves that the connected component method can also be used for denoising/despeckle, or blob removal. For study of this paper, a binary document image having huge size of 4000 3000 in pixels was adopted as a test sample. For simplicity of presentation, Fig. 4 shows only part of image cropped out of the

Application of Floyd-Warshall labelling technique 53 Fig. 3. Original document image sample. Image courtesy of Atalasoft, Inc. sample input image. The run results of connected components software is presented in Fig. 4. For the clarity of presentation, the pixels in a component have different color with the pixels in another component. The run time for this sample test took less than a second, while the other advanced technique announced that it took 2 second for image of size 1769 1168 in pixel [9]. As seen in Fig. 3, the original image contains many lines, forms and symbols as well as characters. Those non-character features thwart good performance on identification for connected components of characters in image. This implies necessity pre-processing of form, line and blob removal. In Fig. 4, unlike the original image which is black and white binary format, each connected component has different colors in order to stress distinction between different connected components. Our study was focused on reducing process time by using linear method, transitive matrix closure. Using transitive matrix without bracketing provided efficiency in processing time. One of the authors in this paper developed an connected component algorithm in 3 dimension image by adopting Dijkstra shortest path algorithm. Dijkstra algorithm typically provides benefit of small memory usage but it consumes hundreds times of processing time due to searching operations between each pair of pixels. This algorithm will work best until an

54 Hyunkyung Shin and Joong Sang Shin Fig. 4. Black pixels components in the original binary document image are separated by the connected component algorithm. image has 1,000 number of connected components in an image. In case of bigger image, we will have to rely on parallelized algorithm. References 1. Alnuweiri, H., and Prasanna, V., Fast image labelling using local operators on mesh-connected computers, IEEE Transactions on Pattern Analysis and Machine Intelligence PAMI-13, no. 2 (1991), 202-207. 2., Parallel architectures and algorithms for image component labelling, IEEE Transactions on Pattern Analysis and Machine Intelligence PAMI-14, no. 10 (1992), 1014 1034. 3. Danielsson, P. E., An Improved Segmentation and Coding Algorithm for Binary and Non-Binary Images, IBM Journal of Research and Development 26 (6) (1982), 698 707. 4. Gonzalez, R.C., and Woods, R.E., Digital Image Processing, Prentice Hall, Upper Saddle River, NJ, 2002. 5. Greiner, J., A Comparison of Parallel Algorithms for Connected Components, ACM Symposium on Parallel Algorithms and Architectures (1994), 16 25. 6. Lumina, R., A New Three-dimensional Connected Components Algorithm, Computer Vision, Graphics, and Image Processing 23 (1983), 207 217. 7. Lumina, R., Shapiro, L., and Zuniga, O., A New Connected Components Algorithm for Virtual Memory Computers, Computer Vision, Graphics, and Image Processing 22 (1983), 287 300.

Application of Floyd-Warshall labelling technique 55 8. Manohar, M., Ramapriyan, H. K., Connected Component Labelling of Binary Image on a Mesh Connected Massive Parallel Processor, Vision, Graphics, and Image Processing 45 (1989), 133 149. 9. Park, J. M., Looney, C. G., and Chen, H-C., Fast Connected Component Labelling Algorithm Using A Divide and Conquer Technique, Technical Report TR-2000-04, University of Alabama (2000). 10. Ritter, G. X., and Wilson, J. N, Handbook of Computer Vision Algorithms in Image Algebra, CRC Press, New York, NY, 2001. 11. Rosenfeld, A., and Pfaltz, J.L., Sequential operations in digital picture processing, J. Assoc Comput Machinery 13 (1966), 471 494. 12. Serra, J., Image Analysis and Mathematical Morphology, Academic Press, New York, NY, 1982. 13. Shi, H., and Ritter, G., Image component labelling using local operators, Image Algebra and Morphological Image Processing IV 2030 of Proceedings of SPIE (San Diego, CA) (1993), 304 314. 14. Yang, X. D., An Improved Algorithm for Labeling Connected Components in a Binary Image, Technical Report TR89-981, Cornel University (1989). Department of Mathematics Information Kyung Won University Sung Nam, 461 701, Korea E-mail: hyunkyung908@yahoo.com, jsshin@kyungwon.ac.kr