Vous êtes sur la page 1sur 13

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO.

3, MARCH 2010 573

An Improved Hough Transform Neighborhood Map


for Straight Line Segments
Shengzhi Du, Member, IEEE, Barend Jacobus van Wyk, Member, IEEE, Chunling Tu, and Xinghui Zhang

AbstractThe distance between a straight line and a straight noise even when lines are fragmented and masked by complex
line segment in the image space is proposed in this paper. Based backgrounds [3].
on this distance, the neighborhood of a straight line segment is de- The main idea of the HT is to map feature points in the
fined and mapped into the parameter space to obtain the param-
eter space neighborhood of the straight line segment. The neigh- image space to the parameter space using
borhood mapping between the image space and parameter space
is a one to one reversible map. The mapped region in the param- (1)
eter space is analytically derived and it is proved that it can be effi-
ciently approximated by a quadrangle. The proposed straight line
segment neighborhood technique for the HT outperforms conven- where is the perpendicular distance of the line to the origin,
tional straight line neighborhood methods currently used with ex- and is the angle between a normal to the line and the positive
isting HT variations. In contrast to the straight line neighborhoods axis. The HT maps each point in the discrete space to
used in existing HT variations, the proposed straight line segment points in the parameter space corresponding to all possible
neighborhood has several advantages including: 1) the detection
error of the proposed neighborhood is not affected by the length of lines through the point. Duda and Hart [2] derived several inter-
the straight line segments; 2) a precision requirement in the image esting properties for the point-to-curve transform. From (1), one
space described using the proposed distance can be explicitly re- can find each point in the image space will be mapped to a sinu-
solved using the proposed formulation; 3) the proposed neighbor- soidal curve in the parameter space. Usually the parameter space
hood has the ability to distinguish between segments belonging to is partitioned into adjoining rectangular cells using a predefined
the same straight line. A variety of experiments are executed to
demonstrate that the proposed neighborhood has a variety of in- resolution in both the and dimensions. The straight line lying
teresting properties of high practical value. on the center point of the rectangular cell in the parameter space
represents all straight lines in this cell. An accumulator is as-
Index TermsHough transform (HT), image space, neighbor-
hood mapping, parameter space, straight line detection. signed to each cell to count the number of sinusoidal curves
through the cell. The image points corresponding to these sine
curves are considered belonging to the representing straight line.
I. INTRODUCTION During the mapping process all the discretized values of are
enumerated and the corresponding values are calculated using
(1). An accumulator, corresponding to the center point of a rect-
HE detection of shapes in images is fundamental to many
T image understanding applications. The Hough Transform
(HT) [1] is one of the most widely used techniques for locating
angular cell in the parameter space, is incremented if any
point in the rectangular cell is associated with a corresponding
straight line in the image space. After voting, the location of the
straight lines, circles and eclipses in images. A large number
peaks in the parameter space represent straight lines appearing
of HT-based object recognition methods have been proposed in
in the image space.
the literature [2][9]. The HT is a robust tool for straight line
The accuracy of the HT received much attention due to er-
detection because it maps lines in the image space to a parameter
rors resulting from discretization and voting in the parameter
space in such a way that the straight line detection problem is
space [5], [6], [10][14], [17][20]. Determining the optimal
converted into a peak seeking problem. This property enables
resolution for the parameter space, therefore, received
the HT to detect straight lines in low quality images degraded by
much attention [4], [10], [12], [13], [18][20]. The standard
Hough transform (SHT) offers a very painful tradeoff: finer
quantization (i.e., higher precision) results in decreased ro-
Manuscript received May 12, 2009; revised October 12, 2009. First published
November 20, 2009; current version published February 18, 2010. The associate bustness [5]. Zhang [14] determined , the resolution in -di-
editor coordinating the review of this manuscript and approving it for publica- rection, by considering the digitization of the spatial domain,
tion was Dr. Arun Abraham Ross.
and then calculated based on the length of the straight line
S. Du is with the Department of Electrical and Mining Engineering, School
of Engineering, College of Science Engineering and Technology, University of and . The nonlinear relation between and was also
South Africa, Pretoria 0003, South Africa (e-mail: dushengzhi@gmail.com). investigated and a nonuniform quantization in the -direction
B. J. van Wyk and C. Tu are with the FSATIE, Tshwane University of
was proposed in [4], where was determined based on the
Technology, Pretoria 0001, South Africa (e-mail: vanwykb@tut.ac.za, tclchun-
ling@gmail.com). value of . The nonlinear properties of the SHT were also com-
X. Zhang is with the Tianjin University of Technology and Education, Tianjin pensated for by weighted voting and peak seeking schemes [6],
300222, China (e-mail: xhzhng@tute.edu.cn). [13], [18]. Because of the existence of image bounds, the pa-
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org. rameter space is never fully populated. Davies [16] reduced
Digital Object Identifier 10.1109/TIP.2009.2036714 the parameter space by considering image bounds and ignoring
1057-7149/$26.00 2010 IEEE

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
574 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 3, MARCH 2010

very short oblique line segments in the corners of a rectan-


gular image. This method resulted in increased resolution and
reduced the computation. Although much research focused on
the parameter space, it is necessary to combine image and pa-
rameter space information to improve detection accuracy. The
compromise that exist between image space localization and pa-
rameter space sampling was discovered by Kiryati et al. [11].
Song et al. [3], whose method showed good performance when
used on large images, utilized both the image space and the
parameter space to detect lines and estimate the thickness of
lines. Ching [7] mapped a single image point to a belt in the
parameter space. The intersection of numerous belts was then
chosen as a straight line. The width of a belt was a function Fig. 1. Difference between collinear segments.
of the width of a straight line [7]. Heather and Yang [15] di-
vided the image to sub-images each of which was mapped to
an individual parameter space. All the local HTs were then the problems associated with existing HT variations mentioned
summed to build the global HT. This method can also detect above, are solved.
the endpoints of straight line segments. In each local HT the The rest of the paper is organized as follows. In Section II, the
segments were considered as the intersections of straight lines problems associated with existing straight line neighborhoods
containing segments in the sub-image, i.e., the longest possible are discussed in detail and several basic definitions are proposed
segments in the sub-image instead of the true segments. This to support the analysis in subsequent sections. In Section III, the
problem leads to the dependance of the detected endpoints to the edges and vertices of the parameter space neighborhood are de-
partitioning of the image. An inappropriate threshold to verify rived. The quadrangular approximation of the parameter space
straight lines in sub-images might break up a continuous seg- neighborhood is also proved in this section. Several experiments
ment in the global image. A robust segment detection method, and image applications are considered in Section IV to demon-
based on the relationship between segment endpoints and HT strate the properties and performance of the proposed method.
features, was proposed by Atiquzzaman and Akhtar [21]. How- Section V concludes the paper.
ever, the detection of collinear segments and macro segments
(i.e., the segments not existing in the picture but easily detected
II. PROBLEM STATEMENT AND BASIC CONCEPTS
by humans) were not investigated.
The majority of existing HT variations are based on the neigh- The HT maps feature points in the image space into the pa-
borhood of straight lines in the parameter space, i.e., the point rameter space and then peaks of discrete cells in the parameter
set in the rectangular regions containing the peaks. This neigh- space (i.e., neighborhoods of straight lines) are taken to repre-
borhood approach is defined using the parameter domain reso- sent straight lines in the image space. The cells are obtained
lutions ( and ) and has several problems including: 1) the by partitioning the parameter space into rectangular areas using
image domain detection error depends on the length of straight prearranged resolutions in - and -directions, i.e., these straight
line segments; 2) the voting and verification processes in the line neighborhoods are defined in the parameter space. Usually,
parameter space do not support predefined image domain pre- in the image space a straight line appears as one or more seg-
cision requirements (see Section II problem 2, for an example); ments instead of a continuous straight line with infinite length.
3) the segments belonging to the same straight line are mapped But in the HT space each point represents one straight line with
to the butterfly shape sets sharing the same center point (i.e., the infinite length. This implies that the definition of a straight line
mapped image of the straight line containing these segments) in in the image space does not entirely agree with the definition of
the parameter space and, hence, cannot be separated during the a straight line in the parameter space. This disagreement leads
verification process. to several problems demonstrated in Fig. 1. and are two
To solve these problems, the image domain distance between straight lines with an angular difference and a difference in
a straight line and a straight line segment is proposed in this distance to the origin of . The values of and
paper, and the neighborhood of a straight line segment is then are assumed to be the resolutions of HT in - and - directions,
defined based on this distance. The relationships between the respectively.
image space and the parameter space are further exploited 1) Problem 1: Refer to Fig. 1. Even if and are very
through mapping the neighborhood of a straight line segment small, the distance between points having the same or co-
between these two spaces. The edges and vertices of the pa- ordinate lying on and , such as , will become very
rameter space neighborhood are analytically derived and it large if moving to points on and in the image space that
is proved that this region can be closely approximated by a are far from segment . Alternatively, this problem also can be
quadrangle. The mapping of different straight line segment described as when verifying straight lines in the HT space, high
neighborhoods in the image space to corresponding areas in the resolutions in the - and - directions can not always guarantee
parameter space is investigated and interesting neighborhood a distinction between two straight lines having an evident dif-
properties are derived. By using image examples it is shown that ference in the image space if the straight lines are long enough,

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
DU et al.: IMPROVED HOUGH TRANSFORM NEIGHBORHOOD MAP 575

Remark 1: The definition of the distance between a straight


line and straight line segment satisfies the first and second prop-
erties of the general distance definition, i.e.,

(2)
(3)

but the third property, i.e.,

(4)

Fig. 2. Perpendicular belt B of straight line segment S . does not hold since Definition 2 implies that if is a straight
line then must be a straight line segment, and if is the
distance between a straight line segment and straight line ,
i.e., the image domain detection error depends on the lengths of then is the distance between two straight line segments
the straight lines. and which is not defined.
2) Problem 2: A predefined precision requirement in the Definition 3 (Neighborhood of a Straight Line Segment in the
image domain, for example the value of for a specified Image Space): Given a straight line segment in the image
variation in , cannot be explicitly supported by the voting and space and a non-negative real , the set of straight lines having
verification processes of the HT in the parameter space. Refer is the neighborhood of with radius , denoted as
to Fig. 1 for clarity. , where is the distance between the straight line
3) Problem 3: In Fig. 1, the straight line can be reasonably and straight line segment as defined in Definition 2.
considered to be lying very near to the straight line segment . Definition 4 (Neighborhood of a Straight Line Segment in the
Considering the existence of noise or uncertainties in the image, Parameter Space): Given a straight line segment in the image
is usually considered to be a part of . For another segment space and a non-negative real , the point set corresponding to
, lying on the same straight line as , it is unacceptable to all straight lines in the parameter space, is the
say is near to , even when considering noise and uncer- parameter space neighborhood of with radius , denoted as
tainties. However, and belong to the same straight line , where is the distance between the straight line
and, hence, are mapped to the butterfly shape sets sharing and straight line segment , given by Definition 2.
the same center point (i.e., the mapped image of ) in the pa- Note that the neighborhoods of a straight line segment in the
rameter space. When considering a straight line in the param- image space and in the parameter space are in agreement and,
eter space, a rectangle with width and height around the hence, the problems shown in Fig. 1 can be solved. This will be
mapped point of is taken to represent in the image space demonstrated in Section IV. To our knowledge, we are the first
without any ability to distinguish between and . to define distances and neighborhoods in this way.
In the sequel, the neighborhood of a straight line segment is For the sake of the clarity during further analysis, the fol-
defined in such a way that there is agreement between the image lowing definition is necessary:
space and the parameter space. Definition 5 (The Concomitant Rectangle of ): The
Definition 1: (Perpendicular Belt of a Straight Line Segment): concomitant rectangle of refers to the point set in the
Given a straight line segment in the image space, the perpen- image space which consists of intersections of straight lines in
dicular belt of refers to the narrowest parallel belt that with the perpendicular belt . The concomitant rec-
completely contains and whose midline is perpendicular to tangle of the neighborhood of with radius , is denoted as
. .
Definition 2: (Distance Between a Straight Line and a Remark 2: The neighborhood of a straight line segment is a
Straight Line Segment): Given a straight line segment and set of straight lines and not a pixel region in the image space.
straight line in the image space, the distance between The concomitant rectangle of this neighborhood is a pixel region
and , denoted as or , refers to the biggest in the image space.
Euclidian distance between and any point in the intersection Fig. 3 demonstrates Definitions 3 and 5. The darkly shaded
of and , where is the perpendicular belt of given by rectangular region is the concomitant rectangle of
Definition 1. , i.e., , which is a subset of .
Fig. 2 demonstrates Definitions 1 and 2. In Fig. 2, is the contains the given straight line segment and whose midline
given straight line segment and the shaded region is the is that belongs to. The width of the rectangle is
perpendicular belt of . has two intersection points with the . All straight lines crossing this region, constituting ,
edges of , i.e., and in Fig. 2. is a straight line having intersect edges and of (one intersection on
intersection points and with the edges of . As shown in and one on ).
Fig. 2, point has the biggest Euclidian distance to , denoted It should be noted that the neighborhood of is not the rectan-
by . Given the intersection, the distance between and is gular region but the set of straight lines running across
, denoted by . and .

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
576 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 3, MARCH 2010

Fig. 3. Image space neighborhood of straight line segment S and its concomi- Fig. 4. Demonstration of the method used to calculate the  in (12).
tant rectangle.

III. NEIGHBORHOOD MAPPING FROM THE IMAGE SPACE TO


THE PARAMETER SPACE

In Section II, the neighborhood of a straight line segment in


the image space, , and the neighborhood in the param-
eter space, , were defined. In this section, the mapping
between and is explored.
Remark 3: is mapped from the image space
to the parameter space. It is a set of points in the parameter space Fig. 5. NDeighborhood of S in the parameter space.
representing the set of straight lines in the image space.
and constitute a one to one map.
It is reasonable to say that and constitute :
a one to one map because of the uniqueness of the way straight
lines transform between 2-D Cartesian coordinates and 2-D (10)
polar coordinates [see (1)] when the values of are restricted to
or to another continuous interval having the same length. where

A. Vertexes of (11)

As shown in Fig. 3, the straight lines and are the edges can be determined from Fig. 4 by
of the rectangular region . Straight lines and run-
ning diagonally through the vertices of the rectangle (12)
have the maximum and minimum in , respectively. It
is important to note that when and are mapped to the pa- where , then
rameter space they are at the rightmost and leftmost points of
. In Section III-B, we will prove that , , and (13)
are the vertices of .
According to Fig. 3, belongs to the straight line with
parameters . is the center of . One can get the Similarly, one can obtain
parameters of , , and as follows:
: (14)

(5) Fig. 5 shows the locations of vertices of given by


(6) (5)(14). Clearly, are the vertex points of
in the parameter space. represents the straight line
: that belongs to. From (5) and (7) one can get the in Fig. 5
as the follows:
(7)
(8) (15)

:
B. Edges of
(9) After locating the vertices of , we can find the edges.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
DU et al.: IMPROVED HOUGH TRANSFORM NEIGHBORHOOD MAP 577

Theorem 1 (Edges and Vertices of ): The mapped


image of the subset of in which the straight lines run-
ning through at least one of the vertexes of the concomitant rec-
tangle constitutes the edges of in the pa-
rameter space. The straight lines running through two vertexes
of are mapped to the vertexes of .
Proof of Theorem 1: Given an arbitrary straight line
, there must exist two straight lines
parallel to running through at least one of the vertices of
.
As shown in Fig. 6, runs through vertex , runs through
vertex , and because , , and are parallel Fig. 6. Demonstration the process to determine the edges of the S neighbor-
hood in the image space.

(16)
As proved in theorem 1, the mapped images of and must
and
lie on the edges of and of as shown in
if Fig. 5. Denoting the acute angle between the straight lines
(17) and as , one can get the polar coordinates
if .
of as
From (16) and (17), one can obtain the mapped image of in
the parameter space, lying on the vertical line connecting the (18)
mapped points of and . By changing the direction of (19)
the mapped points of and draw out two
curves. All mapped points corresponding to straight lines having where and are the coordinates of the vertex of
in lie between these two curves and, in the image space.
therefore, these curves are the edges of . Now connect and using a straight line (dashed line
By selecting an appropriate slope, can reach the case of ) in Fig. 5. The point with lies on the dashed
and running through the vertexes and , respectively, i.e., line. The distance between and is the error of approxi-
. mating the curved edge by the dashed straight line .
It is clear that the straight lines running through two vertexes Since straight lines , and run through vertex of
of are mapped to the joining points of two edges, i.e., , their polar coordinates can be written as follows:
the vertices of . This proved that the mapped points of :
, are the vertexes of .
Corresponding to all possible straight lines in , the
mapped images of and constitute the edges of in (20)
the parameter space with the mapped images of all other straight :
lines in , i.e., all other points in , lying in the
region surrounded by edges , , , as shown
in Fig. 5. This is the end of proof.
(21)
C. Region of :
The edges connecting the vertices of , i.e., ,
, , in Fig. 5 are not necessarily straight lines.
We will now try to discover what these edges look like and (22)
whether they can be approximated by straight lines since the From (21), one can get
latter will be much more practical in image processing applica-
tions.
Theorem 2: The region of can be approximated by
the quadrangular region generated by connecting the vertices of
with straight lines. The approximation error is a higher
order infinitesimal of , where , and is the
length of .
Proof of Theorem 2: Without loss of generality, arbitrarily
(23)
pick a straight line in such as the thick line shown in
Fig. 6. We can construct two lines in , say and , The coordinates of point can be derived as follows:
marked by the dashed lines in Fig. 6, that are parallel to .
and run through vertices and of , respectively. (24)

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
578 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 3, MARCH 2010

(25) Similar results can be obtained for and the approxi-


mation errors for other edges, proving the theorem.
substituting (20) and (22) into (25) get (26), shown at the bottom Remark 4: The approximation error is related to not only
of the page. but also . In image processing applications the image bounds
The distance between and is [see (27), shown at are given, so is limited, and, hence, we can select an appro-
the bottom of the page], When considering that priate resolution through changing and [as shown in
and that the radius of is very small (11)] to minimize the error.
compared to the length of in practical applications, then
is very small, and, hence, , , IV. EXPERIMENTS AND APPLICATIONS
, and we obtain (28), shown at the bottom of
the page, where refers to the perpendicular distance A. Evolution When Changing the Parameters of
from the straight line
This experiment focuses on the neighborhood evolution ac-
(29) cording to the straight line segment parameters. Some results
verify the conclusion drawn by Duda and Hart [2].
to the origin. When is very small From the vertices and edges of defined in the pre-
ceding sections, one realizes that the region of is de-
(30) termined by the following independent parameters of :
1) , the center position of ;
Substituting (30) to (28) we get
2) , the length of ;
(31) 3) , the radius of ;
4) , the direction of .
The right side of (31) is a second order function of reaching It should be noted that is dependent to and ,
the local maximum at when , i.e., since it causes

(32) (33)

(26)

(27)

(28)

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
DU et al.: IMPROVED HOUGH TRANSFORM NEIGHBORHOOD MAP 579

Fig. 9. Straight line segment S rotating around (x ;y ).


Fig. 7. Straight line segment S moving along L.

when is moving. For clarity only three positions of


are shown.
In Fig. 8, it is clear that the straight line segments belonging
to the same straight line have rather different neighborhoods
which can be used to distinguish them. The intersection of all
quadrangles (dark shaded area) represents the mapped image
of the neighborhood of the extended straight line segment of
, i.e., the area that occupied when moving along . As
shown in Fig. 7, is the extended straight line segment of and
is the rectangle surrounded by the thick dotted lines.
It might be surprising to find that in the image space,
but that in the parameter space. This is
because contains more image points than
but contains more straight lines than .
Fig. 8. Evolvement of N (S; r ) when S moving along L. It is reasonable to predict that when moves along
, that the intersection of all quadrangles tends to the
line (vertical diagonal of the quadrangles shown in Fig. 5)
to hold. It is, therefore, unnecessary to specify if both and since will tend to zero, where is
are known in the following experiments. the length of the extending straight line segment of .
Since obtaining is a multi parameter problem, the Fig. 8 also shows that when moves along ,
properties of are not intuitive. We will, therefore, rotates around the mapped image of (the point denoted by
evolve by varying its parameters. Please refer to Fig. 3 the black rectangle).
when reading the following sub-sections. 3) Rotating Around its Central Point : Fig. 9 shows
1) Note 1: To explore the evolution, the parameters (i.e., rotating around its center, i.e., changing . Other parameters
, , , and as mentioned above) of straight line seg- are chosen as
ment are assumed to be known. In image applications these pa-
rameters usually are not available explicitly but can be obtained (37)
by geometrical analysis or other algorithms, such as in [2] and (38)
[15].
2) Moving Along : Assume is moving on the straight (39)
line which it belongs to. This means that only the central po- (40)
sition of is changing while the rest of the parameters
are kept constant at the following values: The neighborhoods for only nine positions of
are shown in Fig. 10 for the sake of clarity.
(34) The points marked by rectangles are the mapped images of
with different .
(35) Fig. 10 shows the rotation of leading to the
(36) moving of . Reminiscent of the case in Section IV-A2,
it is interesting that the moving and rotating patterns exhibit
It should be noted that in this paper, if not otherwise specified, dual-like properties between the image space and the parameter
angles are given rad and length and width, distance and position space, i.e., the movement of in the image space leads to the
in pixels. Since is changing, we cannot obtain using rotation of in the parameter space and the rotation of
(33). Here we fix . As shown in Fig. 7, moves from in the image space leads to the movement of in the
the position to along . Fig. 8 shows the evolution of parameter space.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
580 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 3, MARCH 2010

Fig. 10. Evolvement of N (S; r) when S rotating around (x ; y ). Fig. 12. Evolvement of N (S; r) when changing the radius of N (S; r).

Fig. 11. Evolvement of N (S; r) when changing the length of S . Fig. 13. Evolvement of N (S; r) keeping the ratio r=l.

4) Changing and : Equation (11) shows that (resolu- B. Approximation Error of


tion in - direction) is determined by and . Now keep In Theorem 2, the parameter neighborhood of a straight line
segment was approximated by a quadrangular region. The ap-
(41) proximation error is investigated in the following experiments.
(42) 1) Approximation Error Distribution Versus : This experi-
(43) ment investigates the approximation error distribution versus ,
shown in Fig. 5. From the description in Sections III-C and D,
constant, but change and respectively, i.e., one knows that the vertexes are exactly located (i.e., having no
while keeping and while keeping . approximation error) and the approximation error happens when
Fig. 11 displays the case when keeping but changing the edges of are approximated by straight edges. For
which leads to zooming in the direc- the sake of clarity, this experiment only shows the error when
tion of , i.e., longer straight line segments have a higher -di- the point in Fig. 5 moves along the curved edge . The
rection resolution if the radius of the neighborhood is constant. approximation errors for other edges have similar characteris-
Actually, in image applications, can be used as the tuning pa- tics. Fig. 14 shows the error of approximating the curved edge
rameter providing a margin for noise or uncertainty existing in by the dashed straight edge in Fig. 5 where one can easily
the images. When is selected bigger than the true length of , observes that a maximum error occurs in the middle of the edge.
the neighborhood obtained is a subset of the true set. This was 2) Approximation Error Distribution Versus : The param-
also indirectly proved in Section IV-A2. eter space neighborhood evolution when the segment center
Fig. 12 shows that changing leads to point moves along the straight line, was represented in Sec-
zooming in both the - and - directions. is a tuning param- tion IV-A2. The maximum approximation errors during this
eter for the -direction resolution, i.e., a bigger permits more evolution are shown in Fig. 15.
straight lines to be included in the neighborhood, but it affects It is interesting that there is a minimum error (the error is 0)
the resolution in -direction. in Fig. 15. The minimum error occurs when the straight line
If it is required to change the -direction resolution and keep connecting the origin and the center point of the segment hap-
the -direction resolution, we can change and simultaneously pened to be perpendicular to the segment. This will be verified
but keep their ratio constant. The result is shown in Fig. 13. in the next experiment. The existence of this minimum error

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
DU et al.: IMPROVED HOUGH TRANSFORM NEIGHBORHOOD MAP 581

Fig. 14. Approximation error versus .


Fig. 16. Maximum approximation error versus  .

Fig. 15. Maximum approximation error versus the center point location. Fig. 17. Maximum approximation error versus the length of segments.

hints at the possibility of exactly detecting the parameter space space neighborhood as demonstrated in Section IV-A4. This ex-
neighborhood of segments by selecting an appropriate coordi- periment investigates the approximation errors for various seg-
nate system. In fact, if the origin of the coordinates system lies ment lengths.
on the normal passing through the segment center point then the Fig. 17 shows the maximum error distribution versus the seg-
approximation error will be zero. ment length. It is very clear that longer segments have smaller
3) Approximation Errors When the Segment is Rotating approximation errors. When the length of the segment is very
Around its Center Point: Section IV-A3 investigated the case small, i.e., near to the neighborhood radius, the approximation
when the segment rotated around the center point. This ex- error is large. This is because when the length is very small,
periment will investigate the approximation errors during the in (11) is not small enough to make the approximation in
rotation. (28), (30), and (31) small enough. This is the drawback of ap-
Fig. 16 shows the maximum approximation errors when the proximating the parameter space neighborhood by a quadran-
segment rotates. It is clear that when the segment happened to gular region. Since the approximation error is caused by the
be perpendicular to the straight line passing through both the being not small enough, as hinted by (11), one can select a small
origin and the segment center point, the approximation error is neighborhood radius to alleviate the error.
zero. This verifies the conclusion of the previous experiment.
Fig. 16 also shows additional information: When the straight C. Application to Images
line containing the segment happened to pass the origin the ap- After discussing the properties of , two image appli-
proximation error will be the largest. This also hints at the pos- cations are designed to demonstrate how the proposed method
sibility to avoid large approximation errors. In fact if the coor- works to overcome the problems mentioned at the beginning of
dinate system is selected to avoid the origin to lie on the straight Section II.
line then the approximation error will be smaller. 1) Ability to Distinguish Between Segments of a Straight
4) Approximation Error Distribution Versus the Length of the Line: This sub-section deals with the third problem mentioned
Segment: The length of the segment also affects the parameter in Section II, i.e., the ability of to distinguish between straight

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
582 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 3, MARCH 2010

Fig. 20. Replacing the straight line segment by a longer one in image
application.

Fig. 18. Straight line having different distances to the straight line segments.

Fig. 21. Proposed approach has higher distinction ability for lines lying very
near to each other.
Fig. 19. Distances from L to S and S in the parameter space.

2) Straight Line Resolution: In all the discussions in the


line segments belonging to the same straight line. The assump- paper up until now, the length and the center of straight line
tions used in the experiments appearing in Section IV-A, i.e., segment , i.e., and , are assumed known, however, in
Note.1, are also valid for this application. image processing applications these parameter are usually un-
Fig. 18 illustrates this scenario. Here straight line segments known. In this situation, we consider the intersection between
and belong to the same straight line ( the straight line containing and the image region, i.e., the
rad, pixels) and have a neighborhood of radius . straight line segment as in Fig. 20. From the analysis in Sec-
The lengths of both these segments are 130 pixels and the center
tion IV-A2, we know . So replacing by
positions are different
will lead to a higher detecting precision because a smaller
. The straight line is selected to
will be applied. The center and length of can be obtained
demonstrate the distances to and . All these parameters
by a simple geometrical analysis if and (the position of the
are assumed known. In image processing applications, they can
straight lines mapped image in the parameter space, which we
be obtained using existing algorithms such as [2] and [15].
In Fig. 18, it is clear that is much farther from than . can get from the peaks in SHT) are known.
The proposed method should, therefore, be able to clearly make In this experiment, two straight lines (denoted by and )
this distinction. Fig. 19 verifies this expectation. The lightly running through the same point and having a small angular dif-
shaded region is the neighborhood of with radius and ference are selected to show ability of the proposed method to
the darker region is the neighborhood of with the same ra- distinguish between straight lines. The reason for this selection
dius. It is clear that lies in but far from . is because although and has small distance in the param-
This shows that the neighborhoods ( and ) de- eter space, they may have a big difference in the image space
fined earlier in this paper has the ability to distinguish between when they are long enough, such as the engineering drawing
different segments of a straight line and, hence, solve Problem 3. case discussed in [3].
Fig. 19 shows another fact, i.e., that even if the mapped im- A high resolution setting ( degrees,
ages of straight lines and in the parameter space are not pixels) are chosen for the SHT to obtain a pseudo-continuous
close to each other, there still exist segments of with a small HT space, similar as in [5]. Fig. 21 shows the contours of the
distance to if and are not parallel. HT space in which there are two peaks, i.e., and marked

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
DU et al.: IMPROVED HOUGH TRANSFORM NEIGHBORHOOD MAP 583

Fig. 22. Macro-segments composed of short segment groups.

Fig. 24. Zoomed in HT data of Fig. 22.

(denoting the macro-segments) surrounded by several small


light butterfly shapes are very conspicuous. For the sake of
clarity, these areas are enlarged as shown in Fig. 24. It should
be noted that in Fig. 24 the area denoting is much more dim
compared to the small butterfly shapes around it. Furthermore,
the feature associated with is not a sharp peak needed for
optimal detection, but rather a big plateau. These features
Fig. 23. HT data of Fig. 22 obtained by SHT. obstruct the verification of macro-segments from HT data since
only peaks are considered in SHT. It is also not easy to detect
the plateaus and extract the macro-segment information from
by black squares, representing the two straight lines. The pro- them.
posed neighborhoods (the two quadrangles surrounded by solid The difficulty can be solved using segment neighborhoods.
lines) of straight line segments (the intersections of the image From Fig. 22 it is very clear that the center line of each group
area and and ) have no intersection while the traditional is contained in the intersection of the neighborhoods of these
straight line neighborhoods (the two rectangles surrounded by short segments if selecting a big enough radius for each segment
dashed lines) with similar and have a big intersection to contain the center line. By selecting an appropriate radius to
that even contains the other peak. This shows that the proposed force the center line to obtain support from enough short seg-
neighborhood can distinguish between and with a margin ments, one can find the locations of the macro-segments in the
where the traditional neighborhood would have superimposed parameter space. Fig. 25 shows the detection of the macro-seg-
them. ments.
This experiment, therefore, shows that the proposed method There is a tradeoff in selecting the neighborhood radius. A
solves problem 1 mentioned in Section II. radius that is too small will not ensure that the neighborhoods
For the problem 2, the selection of embodies the image of the short segments intersect; however, too big a radius will
space precision request. include more unwanted segments and the detected parameter
3) Detecting the Macro-Segments Composed of Several Short space area of the macro-segment will be very large and will ad-
Segments: Fig. 22 shows a figure composed of three groups of versely affect detection precision. The ideal radius will cause the
short segments. The center straight lines of these groups, i.e., neighborhoods of all short segments belonging to the group to
, and are not present in the picture. However, when intersect just at one single point (the location of the center line)
humans see this picture they will unconsciously group these seg- in the parameter space. However, it is not reasonable to assume
ments to form lines. It is, therefore, necessary to consider these the existence of the ideal radius in real applications since the
macro-segments in computer vision applications. This experi- disturbances and approximation errors existing in each segment
ment will show how the proposed approach can detect the exis- lead to neighborhoods that are not precise enough to intersect
tence of the macro-segments. at the desired single point. Minimizing the intersection of short
Fig. 23 shows the HT data obtained by the SHT. The center segments while keeping it nonempty is a practical criterion to
straight lines , and are denoted in the figure. The areas determine the radius.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
584 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 3, MARCH 2010

This paper focused on the analysis of the neighborhood map-


ping between the image space and the parameter space and fu-
ture work will explicitly focus on extending and refining these
ideas to retrieve straight line segments using the Hough trans-
form (i.e., the inverse problem).

REFERENCES
[1] P. V. C. Hough, Method and Means for Recognizing Complex Pat-
terns, U.S. Patent 3069654, Dec. 18, 1962.
[2] R. O. Duda and P. E. Hart, Use of the Hough transfromation to detect
lines and curves in pictures, Comm. ACM, vol. 15, no. 1, pp. 1115,
1972.
[3] J. Song and M. R. Lyu, A Hough transform based line recognition
method utilizing both parameter space and image space, Pattern
Recognit,, vol. 38, pp. 539552, 2005.
Fig. 25. Locating the macro-segments using the intersection among the neigh- [4] H. Duan, X. Liu, and H. Liu, A nonuniform quantization of Hough
borhoods of the segments composing the macro-segments. space for the detection of straight line segments, in Proc. Int. Conf.
Pervasive Computing and Applications, 2007, pp. 216220.
[5] V. Shapiro, Accuracy of the straight line Hough transform: The non-
voting approach, Comput. Vis. Image Understand., vol. 103, pp. 121,
2006.
V. CONCLUSION [6] D. Walsh and A. E. Raftery, Accurate and effcient curve detection
in images: The importance sampling Hough transform, Pattern
Three problems arising from the disagreement between Recognit., vol. 35, pp. 14211431, 2002.
straight line definitions in the image space and the parameter [7] Y. T. Ching, Detecting line segments in an imagea new imple-
space when using the traditional HT were discussed in this mentation for Hough transform, Pattern Recognt. Lett., vol. 22, pp.
421429, 2001.
paper. To solve these problems, the neighborhoods of straight [8] J. Cha, R. H. Cofer, and S. P. Kozaitis, Extended Hough transform
line segments in both these two spaces are proposed, based for linear feature detection, Pattern Recognit., vol. 39, pp. 10341043,
on the definition of the distance between a straight line and 2006.
[9] L. A. F. Fernandes and M. M. Oliveira, Real-time line detection
a straight line segment. Through these definitions and subse- through an improved Hough transform voting scheme, Pattern
quent analysis, this paper showed that the straight line segment Recognit., vol. 41, pp. 299314, 2008.
neighborhood in the image space can be made consistent with [10] T. M. van Veen and F. C. A. Groen, Discretization errors in the Hough-
transform, Pattern Recognit., vol. 14, pp. 137145, 1981.
the straight line segment neighborhood in the parameter space. [11] N. Kiryati and A. M. Bruckstein, Antialiasing the Hough transform,
Clearly the proposed methodology removed these disagree- CVGIP: Graph. Models Image Process., vol. 53, no. 3, pp. 213222,
ments. 1991.
[12] I. D. Svalbe, Natural representations for straight lines and the hough
The region of the parameter space neighborhood of a straight transform on discrete arrays, IEEE Trans. Pattern Anal. Mach. Intell.,
line segment was analytically derived and shown to be effi- vol. 11, no. 9, pp. 941950, Sep. 1989.
ciently approximated by a quadrangle, making it suitable for [13] W. Niblack and D. Petkovic, On improving the accuracy of the
Hough transform: Theory, simulations, and experiments, in Proc.
practical image processing applications. The approximation er- Computer Society Conf. Computer Vision and Pattern Recognition,
rors were demonstrated in the experiments, and guidance for 1988, pp. 574579.
minimizing the error was given. The drawback of the proposed [14] M. Zhang, On the discretization of parameter domain in Hough trans-
form, Proceedings of IEEE (ICPR96), pp. 527531, 1996.
approach is also demonstrated in the experiments, i.e., for very
[15] J. A. Heather and X. D. Yang, Spatial decomposition of the Hough
short segments the parameter space neighborhood approxima- transform, in Proc. 2nd. Canad. Conf. Computer and Robot Vision,
tion errors might not be ignored. This drawback can be allevi- 2005, pp. 476482.
[16] E. R. Davies, Truncating the Hough transform parameter space can be
ated by selecting a small neighborhood radius.
beneficial, Pattern Recognit. Lett., vol. 24, pp. 129135, 2003.
Several experiments and applications showed that the pro- [17] E. Magli and G. Olmo, On high resolution positioning of straight pat-
posed method has solved many of the problems associated with terns via multiscal matched filtering of the Hough transform, Pattern
Recognit. Lett., vol. 22, pp. 705713, 2001.
the traditional HT. The proposed neighborhood of a straight
[18] Q. Ji and R. M. Haralick, Error propagation for the Hough transform,
line segment has the ability to distinguish between segments be- Pattern Recognit. Lett., vol. 22, pp. 813823, 2001.
longing to the same straight line. [19] T. T. Nguyen, X. D. Pham, and J. Jeon, An improvement of the Stan-
The method represents the image space resolution explicitly dard Hough Transform to detect line segments, in Proc. IEEE Int.
Conf. Industrial Technology, 2008, pp. 16.
when verifying straight lines in the parameter space. This prop- [20] J. ORourke, Dynamically quantized spaces for focusing the Hough
erty causes the proposed method to outperform the SHT, which transform, in Proc. 7th Int. Joint Conf. Artificial Intelligence, 1981,
puts more emphasis on parameter domain resolutions. pp. 737739.
[21] M. Atiquzzaman and M. W. Akhtar, A robust Hough transform tech-
Outperforming the traditional HT, the proposed approach also nique for complete line segment description, Real-Time Imag., vol. 1,
has the ability to detect macro straight line segments. no. 6, pp. 419426, 1995.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.
DU et al.: IMPROVED HOUGH TRANSFORM NEIGHBORHOOD MAP 585

Shengzhi Du (M08) received the M.S. degree in Chunling Tu received the B.S. degree in computer
control theory and control engineering from Tianjin science from Tianjin University of Technology and
Poly Technology University, Tianjin, China, in 2001, Education, Tianjin, China, in 2002. She is currently
and the Ph.D. degree in control theory and control pursuing the M.S. degree in electrical engineering
engineering from Nankai University, Tianjin, in at the Tshwane University of Technology, Pretoria,
2005. South Africa.
He was a postdoctoral fellow at FSATIE and then Her current research interests include AI, indus-
a Senior Lecturer in the faculty of ICT, Tshwane Uni- trial control, and pattern recognition.
versity of Technology, in 2008 and 2009. Now he is
a permanent Associate Professor at the College of
Science Engineering and Technology, University of
South Africa, Pretoria. His current research interests include AI, neural net-
works, and statistic pattern recognition.
Xinghui Zhang received the M.S. degree from the
Harbin Shipping Engineering College in 1991 and the
doctor degree from Nankai University in 2002.
Barend Jacobus van Wyk (M04) received He is a Professor and Principal at the Tianjin Uni-
the Ph.D. degree from the University of the versity of Technology and Education, Tianjin, China.
Witwatersrand. His main research interests are intelligent control and
He is a Professor at the Tshwane University pattern recognition.
of Technology, Pretoria, South Africa. He has
more than 12 years of industrial experience in
telecommunications and aerospace engineering and
is an NRF (SA) rated researcher who published
more than 80 peer reviewed conference/journal
papers since 1998. His research interests are signal
processing, machine intelligence and control,
image processing, and pattern recognition.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:475 UTC from IE Xplore. Restricon aply.

Vous aimerez peut-être aussi