íg HOUGH TRANSFORM .g OBJECT - mtc-m12:80

AUTORIZAÇÃO PARA PUBLICAÇÃO
AUTHORIZATION FOR PUBLICATIOé
atatanbiomabsase 1,0101081A
amuro DE POMAS ~MI
/
íg
.g
UTORIZADA POR/AllfildelifEED
PALAVRAS CHAVES/KEY WORDS
i
HOUGH TRANSFORM
OBJECT DETECTION
PRIMAL SKETCH
AUTOR RESPONSAVEL
RESPONSIBLE AUTHOR
o
Antírfic. tau.pp
DISTRIBUIÇÃO/DISTRIBUTION
%o
SADA POR / REViSED BY
E] INTERNA / INTERNAL
r 5-(StÀ".."5 `• -.) A.A....-41....",
,
EM EXTERNA / EXTERNAL
CZI RESTRITA / RESTRICTED
FIcivio Roberto D.Velasco„
—..,.._
DATA/DATE
V~UPUU
[___Dezembro 1988
681.3.019
]
0
ORIGEM
ORIGIN
PUBLICAÇÃO N2
PUBLICATION NO
INPEH4564 —PRE/1305
DPI
PROJETO
PROJECT
e
0
USING PRIMAL SKETCH PRIMITIVES
AS THE BASIS FOR THE HOUGH 1RANSFORM
)
(
ANIMA
,
N° DE PAG.
NO O F PAGES
09
,..... VERSÃO
r VERSION
)
ULTIMA PAG.
LAST PAGE
08
ODE MAPAS
NO OF MAPS
a
o
4
Fldvio Roberto Dias Velasco
Antonio Miguel Vieira Monteiro
Leonardo Sant'Anna Bins
1
R
4.
lItbUMU NU I Ab /ATRAUT • NUT tb
The Hough transform was proposed originally as an efficient way
to detect straight lines in images. It has been generalkzed to detect
arbitrary shapes. This generalization made the Hough transfÓrm a kind of
universal tool for object detection. In this paper we propose the use of
primai sketch primitives, as defined by Marr, as the basic elements upon
which the transform is constructed (iNstead ofsimple edge elements). The
advantages of using the primitives are a better discrimination and less
computational effórt. We also show an algorithm for detecting arbitrary
shapes using the primai sketch primitives that deals with the problem of
rotation directly, without the need to quantize for possible rotations.
I, Submited to presentation in Second International Conference on Computer
Vision, December 5 to 8, 1988, Florida, USA.
INPE -49
USING PRIMAL SKETCH PRIMITIVES
AS THE BASIS FOR THE HOUGH TRANSFORM*
Flávio Roberto Dias Velasco
Antonio Miguel Vieira Monteiro
Leonardo Sant'Anna Bins
Departamento de Processamento de Imagens
Instituto de Pesquisas Espaciais
Caixa Postal 515, 12201 - S. J. Campos
Abstract
The Hough transform was proposed originally as an
efficient way to detect straight lines in images. It
has been generalized to detect arbitrary shapes. This
generalization made the Hough transform a kind of
universal tool for object detection. In this paper we
propose the use of primal sketch primitives, as defined
by Marr, as the basic elements upon which the transform
(instead of simple edge elements). The
is constructed
using the primitives are a better
advantages of
effort. We also
discrimination and less computational
show an algorithm for detecting arbitrary shapes using
the primal sketch primitives that deals with the
problem of rotation directly, without the need to
quantize for possible rotations.
1. INTRODUCTION
The Hough transform was originally proposed as a
technique for detecting straight edges in pictures
later extended
and
also
(Rosenfeld, 1969).
It was
success in the detection of curves, lines
applied with
1972; Coehn and
and arbitrary shapes (Duda and Hart,
Luk, 1978; Shapiro, 1978;
Dudani and
Toussaint, 1977;
Davies, 1986). Because the transform is
Ballard, 1981;
work in noisy
computationally efficient
and can
a
it has been increasingly regarded as
pictures,
detection in
low,
for object
general mechanism
(Ballard,
1981;
vision
high-level
and
intermediate
Feldman, 1985).
The idea behind the Hough transform is that each local
feature votes (in Hough parameter space) for the
objects most consistent with that feature. The maxima
in parameter space correspond to possible objects in
Initially only picture points were chosen
the picture.
features.
Later work (Kimme et al. 1975) used
as local
incorporating
directional
features,
more complex
informational.
Following a biologically motivated une of work, Marr
(1976, 1982) proposed a low-level symbolic image
representation - the raw primal sketch - that could
serve aS the basis for all subsequent processing. The
raw primal sketch is transformed in the full primal
* This work was supported by SID Informãtica, Project
01.01.035.0/88
ESTRA, under contract n
sketch through the use of selection and grouping
processes. In this work we investigate the use of the
Hough transform as one of these processes that operate
in the raw primal sketch.
The organization of the paper is as follows. Section 2
describes the raw primal sketch and how it is obtained.
Section 3 reviews previous work by Ballard (1981) in
the detection of arbitrary shapes. Our proposed
algorithm is shown in Section 4 and an example of its
application in Section 5. The results are discussed in
Section 6.
2. THE RAW PRIMAL SKETCH
The simplest representation of the image is the array
of pixel values. For vision purposes, this
representation is considered to be too crude and noisy
to be directly useful. In this work we adopted the nraw
primal sketchn (referred to in this paper as nprimal
sketchn or nsketchn) which was proposed by Marr (1976,
1982) as the basic representation. The raw primal
sketch can be considered the starting point upon which
grouping and selection processes operate, producing the
"fui] prima] sketch".
Although the raw primal sketch is a representation that
is obtained early in the processing, it already has a
It contains explicit information
symbolic nature.
variations of the image that
regarding intensity
correspond to actual physical events in the scene. The
primitives of the raw prima] sketch represent various
kinds of intensity variation. The main steps to obtain
this representation are:
1. nsmoothing" of the intensity image;
2. detection of intensity variations.
The first step aims to minimize noisy variations and
define the resolution or scale in which the variations
are to be detected. The detection of variation can be
performed by first or second order derivatives. If
first order derivative is used, one should look for
if second order derivative
npeaks" in the derivative;
intensity variations correspond to "zero
is used,
crossings" of the derivative.
considerations
neurophysiological
and
Psicophysical
pointed towards using the bi-dimensional Gaussian
filter as smoothing operator and the Laplacian filter
as the derivative operator. The Laplacian and the
Gaussian operators can be combined in a single operator
that is convolved with the image. From the convolved
image the the zero crossing points are detected,
resulting in the "zero crossing image". Ali the
primitive objects that compose the raw prima] sketch
are extracted from this image.
symbolic primitive of the sketch is the "zero
A basic
crossing segmentS". These are obtained by grouping zero
in short straight segments.
They
crossing points
represent the intensity variations at a given scale.
The segments are characterized by the attributes:
position, length, contrast and orientation, as shown in
the following data structure.
(SEGMENT
(POSITION X
(LENGTH
(CONTRAST
(ORIENTATION
Y)
T)
C)
D))
The position can be calculated as the center of the
zero crossing points that originate the segment. The
size is simply the number of zero crossing points. The
contrast can be defined as the average of the zero
crossing contrast and the orientation can be obtained
from the zero crossing orientations (where the zero
crossing orientation is given by the gradient of the
convolved image at the zero crossing point).
Another object of the raw primai sketch is the "bar". A
bar consists of two segments, approximately parallel,
(Hildreth,
distance
that are separated by a small
1980). The descriptor is similar to the one for the
segment, with one additional attribute: the width (the
distance between the two segments). Bars are important
to relate variations of different scales, as the same
variation can originate a segment in a scale and a pair
of segments in a larger resolution.
While segments and bars are derived from a single scale
(defined by the Gaussian filter used), the next
primitive, the "border" is obtained combining different
scales. A border originates if two primitives of the
same kind and similar attributes exist in two different
(but contiguous) scales. The descriptor for the border
is the following:
(BORDER
(POSITION X
(LENGTH
(CONTRAST
(ORIENTATION
(WIDTH
Y)
T)
C)
D)
W))
where width in this case refers to the width of
intensity variation that, along with the contrast, give
how steep is the intensity variation.
3. DETECTION OF ARBITRARY SHAPES
A way to use the Hough transform to detect arbitrary
shapes was suggested by Merlin and Farber (1975). The
method was extended (Ballard, 1981) to make use of edge
elements of the border of the shape. For the object of
interest, a table (R-table) is constructed in the
following way. Choose a reference point
y for the
compute PHI(x) the
shape. For each boundary point x,
gradient direction and r = y - x. Store r as a function
(r = R(PHI)). The algorithm for computing the
of PHI
be
(Let A(p)
the following.
transform is
accumulator array, initially identically zero.)
the
for each edge x do
PHI = gradient direction at x;
r = R(PHI);
p = x + r;
A(p) = A(p) + 1;
end;
Maxima in A correspond to possible instances of the
desired object.
The R-tables have many properties that make it easy to
look for shapes of arbitrary orientation and scale.
This is achieved enlarging the accumulator array that
s, THETA), where s is the
now is a function of
scale parameter and THETA is the rotation. Both the
scale and angle have to be quantized. For instance, to
obtain the R-table for a specific rotation THETA, one
has only to increment the indices of the table by THETA.
4. HOUGH TRANSFORM USING MARR'S PRIMITIVES
Primal sketch primitives convey much more information
than simple edge elements. So it is natural to think of
them as local features to compute the Hough transform.
Although this idea is explicitly mentioned by Ballard
(1981) it was not explored in detail.
sketch primitives one has to modify
To use the primal
the algorithm proposed by Ballard to take into account
kind
the various possible primitive types. For each
(segment, bar or border) a special table has to be
constructed that relates the primitive with the chosen
reference point. When computing the transform, the
table has to be indexed by the type of primitive.
Also the problem of detecting arbitrary shapes in
arbitrary orientations can be dealt with in the
construction of the table by computing not the absolute
angle of the primitive but its angle relative to the
reference point. The advantage of doing so is that it
is much more computionally efficient and there is no
need to quantize for possible rotations.
The algorithm for constructing the R-table for a
specific primitive type is the following. Let y be the
reference point (the same for all primitives). For each
read the orientation
primitive x of the given type,
and position (POS) of x. Compute r = y
attribute (PHI)
POS; from r, extract its angle THETA and modulus Irl.
Store 'ri as a function of PSI (P51 = PHI - THETA). It
can be easily seen that the table thus constructed does
not depend on the orientation of the object.
The algorithm for computing the transform is the
following. (Let A(p) be the accumulator array,
initially identically zero.)
for each
PHI
POS
let
for
primitive x of the sketch do
= x.orientation;
= x.position;
i be the type of x;
each entry Iri, PSI of Ri do
THETA = PHI - PSI;
compute r using Iri and THETA;
p = x + r;
A(p) = A(p) + 1;
end;
end;
Again, maxima in A correspond to possible instances of
the desired object.
5. AN EXAMPLE
To illustrate the method, the Hough transform of a
synthetic image (Figure la) was computed using primal
sketch primitives. The image contains the target shape
in two different positions. The raw primal sketch that
was obtained (Figure lb) is composed of two different
primitive types: segment and border. For each one an Rtable for the object was construted. Figure 2 shows the
results in Hough space; it shows clearly the two peaks
corresponding to the instances of the object present in
the scene.
(a)
Figure 1. a) Original image;
....„
•
•
•
.
.
•
••
••
••
• •
••
•
•
.
•
.
..
•
..
•
.
114.90
(b)
Figure 1. h) Raw primal sketch.
Figure 2. Hough transform.
6. CONCLUSIONS
In this work we propose the use of raw primal sketch
primitives as a basis of the Hough transform. The
advantages to be gained using the primitives are two.
First, because the primitives convey more information,
we tend to obtain sharper peaks in Hough space as a
primitive votes only for the values of its table type.
Second, the computational cost of computing the Hough
transform is proportional to the number of local
features extracted. Because there are much less
there is
a
primitives than simple edge elements,
corresponding decrease in computational effort.
proposed also a simple
is
algorithm it
In the
in
modification that enables it to detect objects
It
is
equivalent
to
performing
different orientations.
in the R-tables,
and it
rotation transformations
dispenses with the quantization of the rotation
parameter. In the proposed algorithm we have to compute
the rotation angles only where needed.
A possibility for future work is to use more complex
local features than those found in the sketch. Simple
grouping operations can be performed, obtaining more
complex basic objects. It is expected that it will
reduce the computational burden while improving the
discriminatory power.
5. REFERENCES
Ballard, D.,
"Generalizing the Hough transform to
Pattern Recognition,
detect arbitrary shapes",
vol.
13(2):11-122, 1981.
Coehn, M. and Toussaint, G. T.,
structures in noisy pictures",
vol. 9:95-98, 1977.
"On the detection of
Pattern Recognition,
Davies, E. R., "Image space transform for detecting
straight edges in industrial images", Pattern
Recognition Letters, vol. 4:185-192, 1986.
Duda, R. O. and Hart,
P. E., "Use of the Hough
transformation to detect lines and curves in pictures",
Communications of the ACM, vol. 15(1):11-15, Jan. 1972.
Dudani, S. A. and Luk, A. L., "Locating edge segments
on outdoors scenes", Pattern Recognition, vol. 10:145157, 1978.
Feldman, J.
A., "Connectionist models and parallelism
in high
level vision",
Computer Vision,
Graphics and
vol. 31:178-200, 1985.
Image Processing
Hildreth, E. C., "Implementation of a theory of edge
detection", Artificial Intelligence Laboratory,
Massachusetts Institute of Technology, Technical Report
579, April 1980.
Marr, D.,
"Early processing of visual
information",
Phil. Trans.
Royal Society of London, 8-275, pp. 483519, October 1976.
Marr, D.,
"Vision", W. H. Freeman and Company, 1982.
"A parallel mechanism
for detecting curves in pictures", IEEE Transactions on
Computers, vol. C-24:96-98, Jan. 1975.
Merlin, P. M. and Farber, D. J.,
"Picture processing
Academic Press, 1969.
Rosenfeld, A.,
by computer",
Shapiro, S. D., "Feature space transforms for curve
detection", Pattern Recognition, vol. 10:129-143, 1978.
Kimme, C.,
Ballard,
D.
H.,
Sklansky,
J.,
"Finding
Communications of
circles by an array of accumulators",
the ACM, vol. 18:120-122, 1975.