Vectorization with the Voronoi L-diagram Gribov A., Bodansky E. ESRI, Inc. 380 New York Str., Redlands, CA 92373-8100 USA {agribov, ebodansky}@esri.com

Abstract A new precision vectorization method has been developed for building centerlines of plain shapes. First a dense skeleton is computed. Centerlines are obtained as a subset of branches of the dense skeleton. The dense skeleton can also be used for obtaining medial axes of shapes. To obtain high precision, the distance transformation 12-17-38 was developed, which gives a good approximation of the Euclidean metrics. The expression the Voronoi L-diagram was coined. Key words: Vectorization, distance transformation, dense skeleton, medial axis, centerline, L-veinerization.

1. Introduction One of the fundamental problems of computer vision, graphic recognition, and vectorization is how to describe plain shapes with vectors. A medial axis is one such description. While a medial axis has a strong definition [1] and can be used for an objective, detailed, applicationindependent description of shapes, it is, unfortunately, unstable and invariant to the transformations of rotation and scaling. Small changes to the border of the shape can result in essential changes to the medial axis (see, for example, [2, 3]). Figure 1 shows that rotation and scaling change the number of medial line branches.

width, centerlines are the longitudinal axes of the symmetry. However there is no strict definition for the concept of centerline. This concept rather is intuitive. So building centerlines is an application driven process and usually is controlled with some thresholds or parameters defined by the operator [4].

a) b) Figure 2. Centerline before a) and after b) rotation Several two steps methods of vectorization were developed. First a medial axis of the plain shape is created. Then the centerline is built as a subset of the elementary segments of the medial axis. To reduce computation complexity and to stabilize algorithms, a veinerization method has been developed [3]. A dense skeleton is built instead of the medial axis. The dense skeleton consists of straight segments connecting all pixels of the shape with each other. The medial axis is a subset of the dense skeleton; therefore a centerline can also be built as a subset of the segments of the dense skeleton. We developed a new veinerization algorithm, which is more accurate at least for horizontal and vertical raster lines.

2. Voronoi L-diagram

a) b) Figure 1. Medial axis before a) and after b) rotation Because of the instability of medial lines there have been many attempts to build “centerlines” that are stable and invariant to rotation and scale transformations (see figure 2). For horizontal and vertical lines with constant

Let the plain shape be given. Split the border of the shape into n sections PLi in points

Ri (i = 1,..., n; n > 1) . Let p be some inner arbitrary point belonged to the shape. Find a point r that belongs to PLi and is the closest to p . The distance between the point p and the border section PLi is the Euclidian distance between the points p and r . Build lines located

Proceedings of the Seventh International Conference on Document Analysis and Recognition (ICDAR 2003) 0-7695-1960-1/03 $17.00 © 2003 IEEE

inside the shape, each point of which has the same minimum distance at least from two border segments. A set of such lines we name Voronoi L-diagram because this diagram divides a plain shape into cells PLi in such way that all inner points of SLk are located closer to PLk than to any other segment of the border. The cells SLk we name Voronoi L-cells (see figure 3).

If the border of the raster shape is split only at the vertices that create convex right angles (figure 1), the Voronoi L-diagram will be an approximation of the medial axis. The dense skeleton of the raster shape can be built as a Voronoi L-diagram if the border of the shape is split at each vertex. We name the procedure of building a Voronoi L-diagram with such segmentation of the border L-veinerization.

4. Splitting the pixel size

Figure 3. Border sections, Voronoi L-cells, and Voronoi L-diagram.

3. The raster method of building a Voronoi L-diagram Divide the border of the raster shape into several sections PLi in the vertices Ri of some border pixels. Let the distance from a pixel to the border be the distance between the center of the pixel and the border. Assign to each inner pixel of the shape the number of the closest section of the border. Each connected component that is a set of the pixels with the same value is a Voronoi L-cell. The border between these cells is a Voronoi L-diagram. This method has already been used for a medial solution of the intersections of raster lines [5] (see figure 4).

Building a medial axis as described above has some shortcomings. The medial axes of horizontal and vertical lines obtained with this method that have a constant width equal to an odd number of pixels will be one pixel shifted from the appropriate symmetry axes. For raster lines one pixel wide, the medial axis will not be built at all. To eliminate these shortcomings, divide each pixel into four square pixels. After that, the width of each horizontal and vertical line is not less than two pixels and equal to an even number of pixels, eliminating the aforementioned shortcomings.

5. Triangle elementary cells or t-cells Some pixels may be located at the same minimum distance from several different border sectors. It is necessary to mark them and to decide how to draw branches through these pixels. To resolve intersections with a Voronoi L-diagram, we go through these pixels by diagonals (see figure 4). Nevertheless, we revealed some cases where Voronoi L-diagrams were broken near these pixels. To eliminate these peculiarities, we used a new rasterization schema; each square pixel was divided into four isosceles triangles (figure 5).

Figure 5. Dividing a pixel into four t-cells.

Figure 4. Intersection as Voronoi L-diagram.

Let the distance between a t-cell and the border be the distance between the border and the center of the t-cell. If some t-cell has the same minimum distance from several sections of the border the number of any of these sections can be assigned to this t-cell. This will not result in discontinuity of the Voronoi L-diagram. In addition, using triangular cells increases precision of the approximation of

Proceedings of the Seventh International Conference on Document Analysis and Recognition (ICDAR 2003) 0-7695-1960-1/03 $17.00 © 2003 IEEE

medial axes because after this, Voronoi L-diagram can consist of straight segments in eight different directions.

7. Building a dense skeleton with L-veinerization

6. Distance transformation 12-17-38

A dense skeleton may be built as a Voronoi L-diagram if we divide the border of the shape in all boundary vertices of square pixels. The following tells how to build a dense skeleton.

One more shortcoming of the described method of building a Voronoi L-diagram is its high computational complexity. To assign the number of the closest border sections to each t-cell, the Euclidean distance from each straight segment of the border has to be calculated. So the computation complexity of the method can be quadratic. For reducing computational complexity, a distance transformation can be used. In this case the minimum distance of the t-cell from the border is calculated based on the distance of the neighbor t-cells from the border. The foundation of any distance transformation is a measure of the distance between neighbor pixels (see, for example, [6]). Figure 6 shows t-cells and distances between them.

1. Define the unique absolute number of each t-cell (ANT) as an integer triplet (i,j,k), where i and j are the numbers of the row and column of the current pixel and k is the relative number of the t-cell (see figure 5). 2. Divide the border of the shape into sections PLi in all 3.

4.

5. 6. 7. 8. 9. 10. Figure 6. Distance between t-cells OA=12*4, OB=OF=17*2, OC=12*6, OD=17*4, OE=12*2, GH=GD=38 The distance between t-cell centers along horizontal or vertical directions is divisible by 12, and the distance along the direction that is parallel to diagonals of pixels is divisible by 17. The distance between the vertex of the base of the isosceles t-cell and the center of this t-cell equals 38. That’s why we named a distance transformation with this metric as 12-17-38. This distance transformation gives a good approximation of the Euclidean metrics.

11. 12.

boundary vertices of pixels. Assign a unique absolute number (ANG) to each border section. Describe each t-cell with a doublet that consists of a number of the closest border section NG and the distance BD to this section. An array (ADC) contains the doublets of each t-cell. Initial values of each t-cell characteristics are NG=-1, BD=MaxInt for foreground t-cells and NG=-2,BD=0 for background t-cells, where MaxInt is the maximum integer. Generate for each t-cell that has a common straight segment or a common point with the border an element of a priority queue consisting of NG, ANT, and BD (BD calculated with distance transformation 12-17-38.) Send the elements to the priority queue. L-veinerization is finished if the priority queue is empty. Extract an element with the minimum value of BD. ANT from the element is the number of the current t-cell. If NG of the current t-cell is not less than 0, go to 5. If BD of the current t-cell is less than BD of the element of the priority queue, go to 5. If NG of the element is equal to ANT of the current tcell, go to 11. Analyze three t-cells that have the common side with the current t-cell. If NG of each of them is not equal to NG of the element, go to 5. Assign NG and BD of the element to NG and BD of the current t-cell. Generate new elements for the priority queue for eight t-cells that are adjacent with the current t-cell (see figure 7). Let ANTk , where k = 0,…,7, be the numbers of t-cells adjacent to the current cell, and

ANTmk , where m = 0,1,2, are the numbers of t-cells that have a common edge with the ANTk -th t-cell. a. k = 0.

Proceedings of the Seventh International Conference on Document Analysis and Recognition (ICDAR 2003) 0-7695-1960-1/03 $17.00 © 2003 IEEE

b. Generate a new element for the priority queue. The element consists of ANTk , NG of the processing element, and is calculated with a distance transformation of the minimum distance BD from ANTk -th t-cell to the border. c. If BD of the new element of the priority queue is not less than BD of ANTk -th t-cell, go to f. d. Push this element into the priority queue. k

e. If NG of at least one of ANTm -th t-cell is

to the centerline or has to be eliminated, the two longest ways along the skeleton from the border to both ends of the segment should be found. The area S of the raster line following along the shortest way is calculated. If S is less than

β * (W + δ ) 2 ,

where W is a local width of the

raster line in the current segment and β and δ are the parameters defined by the operator the current segment of the dense skeleton is eliminated. The larger β and δ are the shorter a centerline is.

equal NG of the new element then BD of the new element is assigned to BD of the

ANTmk -th t-cell. f. k = k + 1. g. If k < 8, go to b. h. Go to 5. a)

Figure 7. t-cells adjacent with the current t-cell If two touching foreground t-cells have different NG, their common side is a segment of the dense skeleton. BD of the t-cell is the distance to the border and will be used for building of the centerlines. To obtain a medial axis from the dense skeleton, the border has to be divided into sections at the vertices of boundary convex right angles. After changing NG of t-cells for numbers of corresponding new sectors, some branches of the dense skeleton will be eliminated, and the skeleton will be turned into a medial axis.

8. Building a centerline Parts of a dense skeleton located close to the border of the shape describe the specific character of the border and are very sensitive to noises caused by scanning, binarization, and others. The more distant the branch is from the border, the more correctly it describes essential singularities of the shape. So a centerline can be build by eliminating segments located close to the border. The name of this procedure is regularization [2] or “pruning” [3]. Each skeleton segment is an edge of some t-cells. To decide whether the segment of the dense skeleton belongs

b)

c) d) Figure 8. Results of vectorization with L-veinerization with β = 0.5 and δ = 144 a) dense skeleton, b) medial axis, c) centerline, d) smoothed centerline Figure 8 shows results of building a dense skeleton (a), a medial axis (b), and two centerlines (c and d) for β = 0.5 and δ = 144 . But centerlines built with pruning do not touch the border. There are different methods for prolongating centerlines. Figure 8d shows a centerline obtained with L-veinerization, approximation of the ends, and smoothing.

9. Conclusion The new method of vectorization, L-veinerization, in contrast to the method described in [3] produces unbiased centerlines at least for horizontal and vertical raster lines. In contrast to the methods from [6,7] it gives a correct result for vectorization of raster lines with variable width, does not depend on their orientation, and does not require additional algorithms for resolution of intersections. L-veinerization can be implemented with different

Proceedings of the Seventh International Conference on Document Analysis and Recognition (ICDAR 2003) 0-7695-1960-1/03 $17.00 © 2003 IEEE

algorithms. We used triangle pixels and developed the distance transformation 12-17-38 to implement this method. Our method requires a lot of memory that can increase the duration of vectorization for too large raster connected components. However there are a lot of applications when duration of automatic vectorization is not very important [8]. The computation complexness of our method is not worse than n*ln(n). So the duration of vectorization with L-veinerization will not be worse than for methods described in [2,3,7,8] if it’s used for interactive semiautomatic vectorization when the image is processed tile by tile. The duration will be acceptable also for vectorization of documents consisting of small raster connected components, for example, text documents.

Acknowledgement

[2] Ogniewicz R.L., Kubler O, “Hierarchic Voronoi Skeletons”, Pattern Recognition, Vol. 28, No. 3, pp. 343-359, 1995. [3] Desseilligny M.P., Stamon G., Suen Ch.Y., “Veinerization: A New Shape Description for Flexible Skeletonization”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.20, No. 5, pp. 505-521, 1998. [4] E. Bodansky, “System approach to a raster-to-vector conversion: From research to commercial system”, In: Levachkine S. Bodansky E., Ruas A. (eds.), e-Proceedings of International Workshop on Semantic Processing of Spatial Data (GEOPRO 2002), 3-4 December 2002, Mexico City, Mexico (2002) (CD ISBN:970-18-8521-X). [5] Bodansky E., Gribov A., “Vectorization of Black/White Raster Images and Resolution of Intersections”, Proc. Of 3rd Int. Conf. “Digital information processing and control in extreme situations, Minsk, Vol.1, pp. 39-44, 2002.

The authors want to thank Michael Karman for his invaluable help in editing.

[6] Rosenfeld Azriel, Pfaltz John L., “Sequential Operations in Digital Picture Processing”, J. Assn. Comput. Machiery, Vol. 13, No.4, pp. 471-494, 1966.

References

[7] Elliman D., “A Really Useful Vectorization Algorithm”, Lecture Notes in Computer Science, 1941, pp. 19-27, 1999.

[1] Blum H. “A transformation for extracting new descriptors of shape”, Models for the Perception of Speech and Visual Form, (W.Watjen-Dann, ed.), MIT Press, Cambrige, Mass., pp. 362380, 1967.

[8] Dori Dov, Wenyin Liu. “Sparse Pixel Vectorization: An Algorithm and Its Performance Evaluation”, IEEE Transactions on pattern analysis and machine Intelligence, 21, No.3, pp. 202215, 1999.

Proceedings of the Seventh International Conference on Document Analysis and Recognition (ICDAR 2003) 0-7695-1960-1/03 $17.00 © 2003 IEEE

Vectorization with the Voronoi L-diagram

{agribov, ebodansky}@esri.com. Abstract. A new precision vectorization method has been developed for building centerlines of plain shapes. First a dense skeleton is computed. Centerlines are obtained as a subset of branches of the dense skeleton. The dense skeleton can also be used for obtaining medial axes of.

216KB Sizes 0 Downloads 157 Views

Recommend Documents

Vectorization with SIMD extensions speeds up ...
Computer Architecture, University of Almerıa, 04120 Almerıa, Spain b National Center ... can be obtained by means of tomographic reconstruction algo- rithms.

Benchmarking the Compiler Vectorization for Multimedia Applications
efficient way to exploit the data parallelism hidden in ap- plications. ... The encoder also employs intra-frame analysis when cost effective. ... bigger set of data.

On the Triangle-Perimeter Two-Site Voronoi Diagram
Voronoi diagram of S with respect to P, denoted as VP (S), ... complexity of VP be similar to that of VS . ... The circumscribing circle of pqr is denoted by C(pqr).

Vindictive Voronoi Games and Stabbing Delaunay Circles
Department of Computer Science. University of ... in locations such that they can “interfere” the business of Player1 ..... time, where d(r1) is the degree of r1 in D.

Efficient Computation of 3D Clipped Voronoi Diagram
widely used in various fields, especially in computer graphics and geom- ... reader is referred to [4, 10, 15] for the properties and applications of the Voronoi ..... the experimental results are tested on a laptop with 2.4Ghz processor and 2Gb.

design and implementation of a voronoi diagrams ...
There are various legal systems in place to protect consumers. Electronic fraud related to ... at lower prices. Online companies are trying their best to attract and ...

VoR-Tree: R-trees with Voronoi Diagrams for ... - Research at Google
Permission to make digital or hard copies of all or part of this work for personal or ... queries search for data objects that minimize a distance- .... VoR-Tree uses more disk space than a regu- ... cessed disk pages; up to 18% improvement).

A Distributed Clustering Algorithm for Voronoi Cell-based Large ...
followed by simple introduction to the network initialization. phase in Section II. Then, from a mathematic view of point,. derive stochastic geometry to form the algorithm for. minimizing the energy cost in the network in section III. Section IV sho

2D Fluid Simulation based on Voronoi Regions
Intel(R) Core (TM) 2 Duo CPU 1.6Ghz(2CPUs),. CPU Memory: 2046 MB RAM, Nvidia GeForce. 8400M GS with 128MB video memory. OpenGL was used as the graphics API library. We used 2400 particles (a total of 4800 particles. + the boundary particles) for each

The With U
South Street. Baptist Church. The With U. 6.30 pm Thursday 5th October [email protected] 01392 279485 www.ssbcexeter.co.uk. Follow us on Twitter or find us on Facebook - @southstbaptist. With an optional Wee Sing to learn the service songs fr

The relation of the golden ratio with the prime numbers
Item 13 - 453 - [12] F. Close, Antimatter, New York: Oxford University Press, 2009. ... Black Holes & Time Warps, New York: W.W. Norton & Company, 1994.

using the hfcs with stata -
The HFCS has several particularities that make it a rather complex data set, though using the appropriate Stata .... foreach var of varlist hb* hc* hd* hg* hh* hi* {.

Getting Started with the Geodatabase.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

Getting Started with the Photon
... Things with the Affordable,. Compact, Hackable WiFi Module PDF EBOOK ... backward-compatible with its predecessor, the Spark Core. Related. Photon Wi-Fi ...

The Mathematics of Gambling - with Related Applications
Apr 12, 2014 - Fair coin: 50-50 chance heads or tails. For some reason I am giving amazing odds of 3 dollars for every 1 dollar if the coin lands on heads. Imagine you have a dollar and want to play the game: how much would you bet? Madhu Advani (Sta

[DOWNLOAD] PDF House Wiring with the NEC
[DOWNLOAD] PDF House Wiring with the NEC