2 RELATED WORK
The image recognition problem can be seen on two
different perspectives, considering the pattern recog-
nition at pixel level or using segments from the vec-
torisation process. Those approaches can recognise
the graphical primitives in image but each one has
specific problems. Song et al. (Jiqiang Song and Cai,
2002b) discussed the recognition from binary images
using each one of these approaches, and they sug-
gested to use both, since neither of them is perfect
enough to handle all the difficulties.
The image recognition at pixel level should be
analysed in a hierarchic point of view, recognising the
features of the drawings from the simplest to the most
complex primitive. Song et al. (Song et al., 2002) con-
sidered that an engineering drawing can be seen as a
collection of lines, arcs, curves, simbols and strings.
In each recognition process the elements detected are
erased or segmented to simplify the next detections.
Dori and Wenyin (Dori and Wenyin, 1999) have
developed a vectorisation system for the mechanical
drawings, firstly doing a description of the image by
segments and detecting higher shapes as circles or
arcs later. But as our maps have elements connected
on contour, a vectorisation and followed by the recog-
nition of shapes would introduce many errors. There-
fore our choice was to analyse the image at pixel level
since it is less complex even though slower (Tombre
et al., 1999).
Song et al. (Jiqiang Song and Cai, 2002a) stud-
ied the vectorisation of engineering drawings at pixel
level and Dosch et al. (Dosch et al., 2000) studied a
system for the recognition of architectural drawings.
The French cadastral map is a completely differ-
ent sheet because it is older and has others types
of problems, Shahbazkia (Shahbazkia, 1998) studied
the recognition of the French cadastral maps. Also
Viglino et al. (Jean-Marc Viglino, 2003) are studying
the contour extraction in the French cadastral map.
The knoweledge on the Portuguese cadastral maps
(analysis domain) is available and we can use it to
simplify the contour extraction.
3 PROCESSING METHODS
The main stages of the cadastral maps recognition are
the detection of circles, the parcel’s number recog-
nition and the contour extraction. Since any parcels
have a contour associated, so the contour extraction
algorithm has as input the circle position to allow the
association with the contour.
The deformation of the image introduces noise and
degradation, and it is going to yield dirt and gaps
in the drawings. The cadastral maps have symbols,
dashes and circles over the contours as well. This su-
perposition difficults the extraction very much since it
is necessary to segment the two elements first.
It is important to deeply look for each problem of
the contour extraction to choose the algorithms that
can solve them. The main difficulties of this analy-
sis are the discontinuities, the elements connected and
the crossing of contour lines. The application of the
line following algorithm (Spinello and Guitton, 2004)
with waiting lists is very complex in the last situation
due to the variety of paths to follow. Furthermore the
line following algorithm does not solve the problem
of elements connected on contour, the association of
each parcel to the contour and neither the discontinu-
ities on it.
In the literature there is not any general method
solving all these problems, however for each problem
there is some possible solution. We chose that each
method had to solve one specific problem since we
think this improves the robustness of the application
and makes it simpler. Each algorithm has different
features and properties and all of them enable us to
solve most of the difficulties.
3.1 Block-Fill Algorithm
From the beginning, we tried to find out an off-the-
shelf method (Tombre et al., 1998) to implement the
contour extraction. Our first idea was to use the classi-
cal snakes algorithm (Kass et al., 1987) but as it needs
some control points and it did not always converge
due to the lack of grey value in image, we did not use
it.
As the method can start the analysis from the circle
position, the flood fill algorithm sounded better. As
some contours have gaps, we implemented an algo-
rithm based on the flood fill but using blocks. The in-
put image is pre-processed by a thinning (Tombre and
Tabbone, 2000) to detect the central contour points
since it is necessary to have the same segment be-
tween two neighbors contours.
The block fill algorithm starts the detection at the
circle position and fills the parcel with blocks of size
NxN. This algorithm is iterative, in the first iteration
the stack has only the circle position, in the second
the first block’s 4-neighbors if the blocks have not any
black pixel inside, the algorithm continues the filling
looking for the neighbor blocks (see figure 2).
The detection of the contour points is done con-
sidering the blocks that touch on the contour. Each
block has neighbor blocks outside of the contour and
they were tested in every directions to detect every
contour points. The goal is to detect as many points
as possible, however as there are parts of the contour
where it is impossible to detect all the points, it is nec-
essary to use a method of line following to detect the
contour points that are between the two parts already
AUTOMATIC EXTRACTION OF CLOSED CONTOURS IN THE PORTUGUESE CADASTRAL MAPS
429