0% found this document useful (0 votes)
29 views5 pages

An Algorithm For Centreline Extraction Using Natural Neighbour Interpolation

This document presents an algorithm for extracting centerlines from scanned maps using natural neighbor interpolation on Voronoi diagrams. It samples the scanned map irregularly using edge detection to find points along edges. It then applies natural neighbor interpolation to reconstruct the image within a Voronoi diagram topological structure. From this, it defines algorithms to extract spatial features like centerlines from the Voronoi structure. The algorithm extracts skeletons and approximates centerlines directly from Voronoi cells for complex spatial features. This approach aims to improve current practices in spatial data acquisition by reducing costs and work for raster to vector conversion.

Uploaded by

thangqd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views5 pages

An Algorithm For Centreline Extraction Using Natural Neighbour Interpolation

This document presents an algorithm for extracting centerlines from scanned maps using natural neighbor interpolation on Voronoi diagrams. It samples the scanned map irregularly using edge detection to find points along edges. It then applies natural neighbor interpolation to reconstruct the image within a Voronoi diagram topological structure. From this, it defines algorithms to extract spatial features like centerlines from the Voronoi structure. The algorithm extracts skeletons and approximates centerlines directly from Voronoi cells for complex spatial features. This approach aims to improve current practices in spatial data acquisition by reducing costs and work for raster to vector conversion.

Uploaded by

thangqd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

AN ALGORITHM FOR CENTRELINE EXTRACTION USING NATURAL NEIGHBOUR

INTERPOLATION

Darka Mioc \, François Anton [ and Girija Dharmaraj \

\Department of Geomatics Engineering


University of Calgary
2500 University Drive NW, Calgary, AB, Canada, T2N 1N4
[email protected], [email protected]
[Department of Computer Science
University of Calgary
2500 University Drive NW, Calgary, AB, Canada, T2N 1N4
[email protected]

KEY WORDS: acquisition, GIS, integration, extraction, automation, triangulation, digitisation

ABSTRACT

Data caption and conversion are two of the most costly operations of any GIS, in terms of computer time and manual work needed for
spatial data acquisition. They can represent up to 80 percent of the total implementation costs. Manual digitising is a very error prone
and costly operation, especially due to the lack of explicit topology in commercial GIS systems. Indeed, each map update might require
the batch processing of the whole map. Currently, commercial GIS do not offer completely automatic raster/vector conversion even for
simple scanned black and white maps. Various commercial raster/vector conversion products exist for the skeletonisation or thinning
of the pixels forming the line, but these approaches have shown difficulties with the extraction of good topology. The spatial feature
extraction in raster/vector conversion systems is based on line tracing algorithms. In order to operate they need user defined tolerances
settings, what causes difficulties in the extraction of complex spatial features, for example: road junctions, curved or irregular lines
and complex intersections of linear features. The approach we use here is based on image processing filtering techniques to extract the
basic spatial features from raster data. These spatial features can be used for the reconstruction of the image within the topological
data structure - the Voronoi diagram. The novel part of this research is the definition of deterministic topological rules and algorithms
for extracting the spatial features from the Voronoi data structure. These spatial features can then be represented in different spatial
data structures that can be implemented in a GIS. In this research we use the topological approach to develop new algorithms and
data structures for integrated raster/vector models leading to the improvement of data caption and conversion in GIS and to develop
a software toolkit for automated raster/vector conversion. The approach is based on computing the skeleton from Voronoi diagrams
using natural neighbour interpolation. In this paper we present the algorithm for skeleton extraction from scanned maps. We show that
the skeleton extracted from the map features can approximate the centreline of the map object. We apply this algorithm directly on the
Voronoi cells, for the extraction of complex spatial features. This research can lead to the improvement of current practices in spatial
data acquisition reducing significantly the cost and amount of work needed.

1 INTRODUCTION Local coordinates based on the Voronoi diagram are used in natu-
ral neighbour interpolation (also studied in (Gold, 1994) as “stolen
In this paper we present an algorithm for raster to vector con- area” interpolation), to quantify the “neighbourliness” of data
version of scanned maps using skeletonisation from Voronoi dia- sites. The properties of these local coordinates have been exten-
gram. This involves sampling the scanned map irregularly using sively studied by Sibson (Sibson, 1980) and Piper (Piper, 1993),
edge detection algorithms and then applying the natural neigh- who gave a formula for the gradient of the volume stolen from
bour interpolation. Since we are considering a scanned map in neighbouring Voronoi regions due to the insertion of a query point,
grayscale, the interpolant is the level of grey. obtained from two directional derivatives. The natural neighbour
or stolen area interpolation technique has been extended from or-
In spatial interpolation, local techniques have been used in or- dinary Voronoi diagrams to Voronoi diagrams for sets of points
der to get an interpolation continuous at data points, and smooth and line segments in (Anton et al., 1998). Anton et al. (Anton et
around data points. In these local techniques, the data points al., 1998) extended the results presented in Gold and Roos (Gold
which influence the interpolant are the ones neighbouring the and Roos, 1994), by providing direct vectorial formulas for the
given interpolation point. The interpolation is thus based on the first order and second order derivatives for the stolen area. The
definition of adjacency or of neighbourliness. In 1D, the neigh- analysis presented in (Anton et al., 1998) generalises the analysis
bourliness is given by the natural topology of the real line, in- of Piper (Piper, 1993) based on the formalism of partial deriva-
duced by its total order. In 2D, there is no such relationship, and tives, to the formalism of derivatives of a function on a normed
the neighbourliness can be defined by some topological struc- space.
ture. Such structures include the Delaunay triangulation, that
is the dual of the Voronoi diagram. The Delaunay triangulation
has been extensively used in linear interpolation (which corre- In section 2, we introduce the concept of Voronoi diagrams of a
sponds to convoluting with the triangle or Barlett filter (Foley et set of points. In section 3 we present the relationship between the
al., 1996)). Another local technique is the natural neighbour in- skeleton and the Voronoi diagram. In section 4 we present three
terpolation (Sibson, 1981) based on local coordinates. different techniques to sample the scanned map irregularly for
detecting the edges in the map. In section 5, we present the nat-
These local coordinates were introduced by Sibson (Sibson, 1980). ural neighbour interpolation technique. In section 6, we present
our centreline algorithm that uses the natural neighbour interpo- are built are: the derivative in the direction of the gradient, the
lation technique and skeletonisation. In section 7 we present the Laplacian, the directional derivatives and the statistical differenc-
experimental results. Finally, in section 8 we present discussion. ing.

We select the data points where the variation of the intensity is


2 THE VORONOI DIAGRAM OF A SET OF POINTS the highest i.e. at the edges. In order to get sample points around
the high frequency changes in the image we use two edge detec-
Let us first introduce the definition of the Voronoi diagram for a tion algorithms based on the Laplacian and one edge detection
set of sites (i.e. objects) in the Euclidean plane. algorithm based on the derivative in the direction of the gradient.
Definition 1. Let O be a set of sites in the Euclidean plane. For
The gradient is the first order differential of the interpolant at the
each site o of O, the Voronoi cell V (o) of o is the set of points
point. The derivative in the direction of the gradient gives the
that are closer to o than to other sites of O. The Voronoi diagram
highest variation of the interpolant (in our case the level of grey)
V (O) is the space partition induced by Voronoi cells.
at the point. This derivative in the direction of the gradient equals
Then let us introduce the definition of the Delaunay triangulation to the highest magnitude of the derivative, i.e. the square root of
of a set of sites (or objects) in the Euclidean plane. the sum of the squares of the derivatives in any pair of orthogonal
» –1
` ∂f ´2 “ ∂f ”2 2
directions, e.g. + ∂y . This is a well behaved
Definition 2. The Delaunay triangulation of O is the geometric ∂x
dual of the Voronoi diagram of O: two sites of O are linked by function used in image sharpening and edge detection. In the
an edge in the Delaunay triangulation if and only if their cells are gradient based sampling that we used, we took the square root of
incident in the Voronoi diagram of O. the sum of the square of the difference between the row above and
the row below the pixel, and the square of the difference between
the strip on the left and right of the pixel.
3 SKELETONS FROM VORONOI DIAGRAMS
“ 2 2

A very illustrative definition of the skeleton is given by the prairie- The Laplacian ∇2 f = ∂∂xf2 + ∂∂yf2 is proportional to the varia-
fire analogy: the boundary of an object is set on fire and the skele- tion of the derivative of the interpolant at the point with respect to
ton is the loci where the fire fronts meet and quench each other. an annulus centered at the point. We used two different computa-
Imagine a fire along all edges of the polygon, burning inward tions for the Laplacian, the standard Laplacian, and an alternative
at a constant speed. The skeleton (Skiena, 1997) is marked by Laplacian where the “annulus” is composed of eight pixels in-
all points where two or more fires meet. This operation is also stead of four. In this alternative Laplacian, a √12 factor is used to
called the medial-axis transformation and is useful in thinning a compensate for the wider diagonal pixel separation. These two
polygon, or, as is sometimes called, finding its skeleton (Skiena, Laplacian based sampling techniques are the other two sampling
1997). Another approach to compute skeletons is based on the techniques we used in our experimentation.
Voronoi diagram. The medial-axis transform of a polygon P is
simply the portion of the line-segment Voronoi diagram that lies
within P.

The simplest and most readily implementable thinning algorithm


(Skiena, 1997) starts at each vertex of the polygon and grows
the skeleton inward with an edge bisecting the angle between the
two neighboring edges. Eventually, these two edges meet at an
internal vertex, a point equally far from three line segments. One
of the three is now enclosed within a cell, while a bisector of
the two surviving segments grows out from the internal vertex.
This process repeats until all edges terminate in vertices (Skiena,
1997). The Voronoi diagram of a discrete set of points (called
generating points) is the partition of the given space into cells so
Figure 1: Annulus of 4 pixels
that each cell contains exactly one generating point and it is the
locus of all points which are nearer to this generating point than
to other generating points.

Each polygon formed by edges of the map has sample points near
its boundary. If the density of the boundary points (as generat-
ing points) goes to infinity then the boundary of the union of all
the Voronoi zones belonging to points of the same polygon con-
verges to that polygon. The boundaries between Voronoi zones
belonging to points of different polygons converges towards the
skeleton of the objects in the polygon. This property is impor-
tant in designing the algorithms for sampling the map features on
the scanned maps. In the next section we will present the edge
detection algorithms that we used for sampling the images.
Figure 2: Annulus of 8 pixels

4 EDGE DETECTION IN SCANNED MAPS


The sampling consists in selecting all the pixels whose derivative
There are a wide variety of edge detection algorithms that exists, operator value is bigger than some threshold. After the image is
but the set of basic tools on which most of the general algorithms irregularly sampled, the Voronoi diagram (and its dual graph: the
Delaunay triangulation) of the set of samples is computed using
an incremental algorithm based on the Quad-Edge data structure
(see (Guibas and Stolfi, 1985) for an introduction to the Quad-
Edge data structure and the algorithms for the construction of the
Voronoi diagram based on this data structure).

5 NATURAL NEIGHBOUR INTERPOLATION

In this section we will make a brief introduction to the work


for natural neighbour interpolation presented by Gold and Roos
(Gold and Roos, 1994). Consider a set of points

O := {P1 , . . . , Pn }.

Consider what would be the Voronoi diagram V D(S ∪{x}) after


the insertion of another point x ∈ R2 . The goal is to compute
the areas that x would steal to its neighbours if it was inserted in
the Voronoi diagram without actually inserting x in the Voronoi
diagram.
Figure 3: Voronoi diagrams of data points
The Voronoi diagram of points in the plane forms a network of
vertices and edges. The vertices are the points that have at least
three nearest neighbours while the edges are the loci of points
having at least two closest neighbours.

Let vi,i+1 (x) denote the Voronoi vertex whose nearest neigh-
bours are Pi , Pi+1 and x. Since Pi and Pi+1 are two nearest
neighbours of x, it is clear that vi,i+1 (x) lies on the bisector
Bi,i+1 of the points Pi and P1+1 :

Bi,i+1(µ) := mi,i+1 + µni,i+1 with µ ∈ R,

Pi + Pi+1
mi,i+1 := and
2

„ «
Pi+1,2 − Pi,2
ni,i+1 := ⊥ [Pi+1 − Pi ].
Pi,1 − Pi+1,1

We can construct the parametric representation of the bisector


(Gold and Roos, 1994) and we can compute the position of the Figure 4: Interpolation point
Voronoi point vi,i+1 (x):

[x − Pi+1 ]T [x − Pi ]
vi,i+1 (x) := mi,i+1 + ni,i+1 .
2ni,i+1 T [x − Pi ]

Each site Pi has a given height hi . The height of the inserted


point x is determined by the weighted area (Gold and Roos, 1994):
X area[v(x) ∩ v(Pi )]
h(x) := hi ,
area[v(x)]
i:v(x)∩v(Pi )6=∅

where v( ) denotes the Voronoi zone of . Figures 3, 4 and 5


show the construction of the Voronoi polygons. Both regions
v(x) ∩ v(Pi ) and v(x) are convex and the corners of v(x) are
Voronoi points in V D(S ∪ {x}) and the corners of v(x) ∩ v(Pi )
are Voronoi points in V D(S) or V D(S ∪ {x}).

The areas of the Voronoi zones can be computed as sums of tri-


angles in the following way: let P1 , . . . , Pk denote the Voronoi
neighbours of x in counterclockwise order. The area of v(x) is
equal to the sum of the areas of the triangles 4(x, vi,i+1 (x), vi+1,i+2 (x))
ie.:
X1 Figure 5: Area stolen by the new point
area(v(x)) = det[vi,i+1 (x) − x, vi+1,i+2 (x) − x]
2
In fact, assuming that v(x) is bounded, i.e., x lies within the inte-
rior of the convex hull S, we can obtain in the same way the area
of the region v(x) ∩ v(Pi ) (Gold and Roos, 1994).

Thus this allows us to finally compute the variable height h(x).


The interpolated height is in fact the weighted average of the lev-
els of grey of the neighbouring sample points with the weights
being the areas that would be stolen to the neighbouring sampled
points.

6 THE ALGORITHM

Now we will present the algorithm we developed for the skeleton-


isation of sampled map features. Even though there is a similar
algorithm for skeleton extraction from scanned maps proposed by
Gold (Gold, 1999) this algorithm is treating only black and white
images. Our algorithm is different in this sense because we are
interpolating the level of grey. We call “edges” of the picture, the
boundaries of the zones where the level of grey changes contin-
uously. The edges of the picture are first detected as a subset of
the Voronoi diagram and of the Delaunay triangulation of the set
of sampled points. The edges are detected through several crite-
rions on the edges of the Voronoi diagram of the sampled pixels.
The first criterion is that the difference of the levels of grey of the
extremities of the Voronoi edge should be smaller than the differ- Figure 6: Original picture
ence of the levels of grey of the extremities of the dual Delaunay
edge. The second criterion is that the dual Delaunay edge and the
Voronoi edge (considered as line segments) intersect. The third
criterion is that the levels of grey of the extremities of the Voronoi
edge and of the dual Delaunay edge are not all the same.

The resulting subset of the Voronoi diagram is the set of all the
edges of the picture, which we call the border set. We flag the
Voronoi edges adjacent to a Voronoi edge of the border set that
do not belong to the border set.

Then from this border set, we draw the skeleton using a traver-
sal of the Voronoi zones belonging to the interior of the border
set. For each Voronoi edge e of the border set, we traverse the
Voronoi edges of the Voronoi zone that belongs to the interior of
the border set starting from the Voronoi edge following e.

We mark each one of the traversed Voronoi edges as visited. For


each one of those Voronoi edges f that belongs to the border set
and is not adjacent to e, we draw the bisector of e and f in the
skeleton.

For each one of those Voronoi edges f that are not in the border
set and such that one of its neighbours is flagged, then the Voronoi
edge is drawn in the skeleton.

7 EXPERIMENTAL RESULTS

In this section we present experimental results of our algorithm


that are applied to processing of scanned maps. The original
scanned map is shown in Figure
Figure 7: Delaunay triangulation
The sample points are shown in Figure

The Delaunay triangulation of the sample points is shown in Fig-


ure

The border set and the skeleton are shown in Figures


8 DISCUSSION

We have shown in this paper an application of the natural neigh-


bour interpolation for skeletonisation of scanned maps. We have
presented an example of use of this interpolation technique for
the centreline extraction. Our future work will try to prove the
use of this interpolation technique for automated conversion of
scanned maps.

9 ACKNOWLEDGMENTS

This research work has received the financial support of NSERC


Discovery Grant and University of Calgary Starter Grant to the
first author and an Alberta Ingenuity Fund Fellowship to the sec-
ond author.

REFERENCES

Anton, F., Gold, C. and Mioc, D., 1998. Local coordinates and
interpolation in a Voronoi diagram for a set of points and line seg-
ments. In: The Voronoi Conference on Analytic Number Theory
and Space Tillings, pp. 9–12.

Foley, J. D., van Dam, A., Feiner, S. K. and Hughes, J. F.,


1996. Computer graphics (2nd ed. in C): principles and practice.
Figure 8: Border set and skeleton
Addison-Wesley Longman Publishing Co., Inc.

Gold, C., 1999. Crust and anti-crust: A one-step boundary and


skeleton extraction algorithm. In: Proc. 15th Annu. ACM Sym-
pos. Comput. Geom., pp. 189–196.

Gold, C. and Roos, T., 1994. Surface modelling with guar-


anteed consistency - an object-based approach. In: J. Niev-
ergelt, T. Roos, H.-J. Schek and P. Widmayer (eds), Proceed-
ings: IGIS’94: Geographic Information Systems,Monte Verita,
Ascona, Switzerland, Lecture Notes in Computer Science, Vol.
884, Springer-Verlag, Berlin, pp. 70–87.

Gold, C. M., 1994. Persistent spatial relations - a systems design


objective. In: Proc. 6th Canad. Conf. Comput. Geom., pp. 219–
224.

Guibas, L. J. and Stolfi, J., 1985. Primitives for the manipulation


of general subdivisions and the computation of Voronoi diagrams.
ACM Trans. Graph. 4(2), pp. 74–123.

Piper, B., 1993. Properties of local coordinates based on Dirich-


let tessellations. In: Geometric modelling, Springer, Vienna,
pp. 227–239.

Sibson, R., 1980. A vector identity for the Dirichlet tesselation.


Math. Proc. Camb. Phil. Soc. 87, pp. 151–155.

Sibson, R., 1981. A brief description of natural neighbour inter-


polation. In: V. Barnet (ed.), Interpreting Multivariate Data, John
Wiley & Sons, Chichester, pp. 21–36.

Skiena, S., 1997. The Algorithm Design Manual. Springer-


Verlag, New York, NY.

Figure 9: Skeleton

You might also like