ICSP'O2 Proceedings
A HOUGH TRANSFORM-BASED METHOD FOR FAST DETECTION
OF FIXED PERIOD SINUSOIDAL CURVES IN IMAGES ZOU Changchun
SHI Ge
(School of Earth and Space Sciences, Peking University, Beijing China 100871) E-mail:
[email protected] Abstract: This paper deals with research on detecting a kind of fixed period sinusoidal curves in images. A novel method based on Hough transform is proposed for the purpose, which proceeds on two stages. The first stage locates the baselines of sinusoidal curves using a voting process. The second stage determines the amplitude and original phase of the curve corresponding to a baseline position by a 2-D Hough transform. Experimental results are given for synthetic images with and without noise. Compared to the standard Hough transform, this method reduces the computer storage and computation significantly, and saves much more.time. Key words: image sinusoidal curve detection Hough transform(HT)
1. Introduction The Hough transform, fwst introduced by Hough [I] in 1962, is a powerful method for parameteiextraction of any analytic pattem in images. By mapping features in an image space into sets of points in a parameter space, the Hough transform converts a difficult global detection problem to a more easily solved local peak detection problem[2]. The main advantages of the Hough transform are its robustness to noise in the image and discontinuities in the pattern to be detected. The standard Hough transform(SHT) can be successfully adapted for detecting patterns with two parameters, e.g. straight lines,' centres of circles with a fixed radius, parabolas y = ax'+ bx + c (with constant c ) etc. However, direct application of the Hough transform .for detecting patterns with three or more parameters is not practical because both the computer storage and computation grow exponentially with the number of parameters. Scholars have proposed many efficient implementations of the Hough transform in order to overcome the disadvantages. These methods can roughly be divided into two types: One is general methods suitable for various patterns, such as the fast
Hough transform (FHT) [3], the adaptive Hough transform (AHT) [4], the random Hough transform (RHT) [ 5 ] , and the multi-resolution Hough transform (MRHT) [6], etc. The other is special ones only suitable for some patterns. Special methods are based on features of the patterns themselves, and usually run faster than general methods. For example, circles and ellipses are detected with their symmetrical properties by Goneid e/ a/.[7]and Lei e/ a/.[8]. In this paper we focus on detecting a kind of fixed period sinusoidal curves. As shown in Fig.l(a), a cylindroid intersects a tilted plane, and the trajectory is a sinusoidal curve with a period equal to the perimeter of the cylindrical surface when unrolling the surface at any orientation, see Fig.l@). One example in real world is borehole wall images provided by ultrasonic logging tools in scientific drilling or oil exploration. The intersection of a tilted planar fracture with a cylindrical borehole ideally results in a sinusoidal curve. For the sinusoidal curve detection, there are three parameters, namely the baseline position, amplitude and original phase. Glossop e t . a1.[9] and Torres et a/.[10] implemented the Hough transform with a 3-D transformed space to parameterize and label sinusoidal patterns from borehole wall images. A similar algorithm for fracture detection was also discussed in the literature [ I I].
$1 (b) Fig.1 (a) Tmjectov o f a cylindroid intersecting a lilted plane. (b) ifs unrolled image.
0-7803-7488-6/02/$17.00 Q 2002 IEEE.
909
We develop a novel method for detecting the fixed period sinusoidal curve in Fig.I(b). The 3-D problem is decomposed into a 1-Dproblem and a 2-D so as to save the computation and storage space. This method proceeds on two stages. The first stage locates the baselines of sinusoidal curves using a voting process. The second stage determines the amplitude and original phase of the curve corresponding to a baseline position by a 2-D Hough transform.
2. Algorithm principle The sinusoidal curve S shown in Fig.2 satisfies an equation of the form y=Asin(wx+cp]+y,
(1)
,
where is its baseline position, A cp is original phase, w is angular frequency, w = 2 d T , and T is a fixed period. The horizontal line I,, is the baseline of the curve, which is described by y = yo .
Fig2 A sinusoidal C U N ~ with one period in I h 5 h
2.1 Locating the baseline of the fixed period sinusoidal curve Two points on the sinusoidal curveS, with a horizontal distance of T/2, are chosen to'match in pairs. The coordinate of one of them is denoted by P ( x , , y , ) , and the other b y P ( x , . , y p , )We . have
Ix,, - xpl = T/2
(2)
We useC(x,,y,) to represent the midpoint of the pair of points P and P' . The vertical coordinate y, can be computed by Yc
=
b,. + Yp.)/2
(3)
According to the property of a sinusoidal curve, the midpoint C of a pair of points on the curve happens to fall on l H. A sinusoidal curve with N points can be matched into N / 2 pairs of points. For all pairs of points on a curve, the vertical coordinates of their midpoints are the same. Therefore, these midpoints can be used to represent the baseline. For each pair of edge points in the image, the vertical coordinate of their midpoint is mapped into a I-D parameter space by a voting process same as in the Hough transform. There must be a peak corresponding to the baseline of a sinusoidal curve in the parameter space. In actual implementation, a 1-D accumulator array is used to accumulate the votes. The baseline positions can be determined by searching the local peaks in the array. The steps of the algorithm is given as follows: a) Divide the original image into two equal divisions. The left is I , , and the right is Z2 . b) Construct a 1-D accumulator arrayACC.ly,lfor the parameter space ofyo, and initialize all elements of ACC1V,]to zero. c) For each edge point P in I , , carry out the following steps from d) to 8). d) Find an edge pointP' at a vertical scan line x = xp + T/2 in I , , match point P with P'in pairs, and then carry out the following steps from e) to 8). e) Compute the vertical coordinate y, of the midpoint of the pair of points P and P'by equation (3). f ) The element in the accumulator array associated to ycis incremented by one, i.e. ACCLy,]= ACCb,]+ 1 . g) Loop until all edge points at the vertical scan line in I , are computed. h) Scan the accumulator array to find local maxima, each maximum corresponding to a baseline position. i) End.
.2.2 Determining the amplitude and original phase of the fixed period sinusoidal curve Once the baseline of a sinusoid curve is located, two parameters, the amplitude A and original phase cp , are still unknown. Now we use the Hough transform to extract these parameters. We can rewrite equation (1) as
910
'
-
-4= Y -Yo.. sin(wx+q)
(4)
The 2-D parameter space is constructed with A and cp. The ranges of A and cp are set to 0 5 A 5 AMAXand 0 I cp I T I respectively, A, should be chosen according to the priori information. According to equation(4), an arbitraw edge pointP(x,y) in the image space is mapped to a curve in the parameter space. The steps to parameterize a sinusoidal curve with a known baseline position is given as follows: a) Construct a Z-D accunukitor array ACCI~KAJ for the parameter space (cp,A),and initialize all elements of ACC1pjlAjto zero.
to the curve in the original image. A baseline position, yo = 200, is obtained by searching the peak. Another parameter space(cp,A) is constructed to extract the remaining parameters of the sinusoidal curve. The range of A is from 0 to 200, and 9 is fromooto360°. Fig.3(c) shows a 2-D parameter space corresponding to yo = 200, where there is one peak. The parameter values extracted from the image are identical to the values to create the curve.
:fq 400
!no
b) For each baseline positioriy,, carry out the following steps from c) to h). c) For each edge pointP in the image, cany out the following steps from d) to g). d) Forqincremented from 0 toT, cany out the
0 lop
0
200
(b)
. . .. .. . . . . .. . . . . .. . . .. .. . . . . . . . .. . . . ...,. .. . . ..;... . . . ...... " j [j 'j.. ..... ........ .":
]
following steps from e) to 9. e) Compute the amplitude A by equation (4). 9 If A is within the range of (0 AMiX), increment the element in the accumulator array at (9, A ) .by
-
1
ACC[qIA]=ACC[q][A]+l. (4
g) Loop. until all edge points in the image are computed. h) Scan the accumulator array to find the local maxima, each maximum corresponding to the amplitude and original phase of a sinusoidal curve. i) End.
Fig.3 Example for detecting a fixed peed sinusoidal curve in image. (a) original image with a sinusoidal curve, (b) I-D panineter space for locating the baseline, (c) 2-D p8rameter space corresponding to yo = 200
Fig.4(a) shows another synthetic image with three sinusoidal curves and 'salt and pepper' noise. The size of the image is the same as Fig.3(a). The parameter values to create these sinusoidal curves from equation(1) are shown in Table I. The noise density is equal to 0.02. Fig.4(b) shows a I-D voting space for locating the baselines of sinusoidal curves. Though the noise enhances the disturbance of the votes, there are two sharp peaks in the voting space. The lower peak is corresponding to two sinusoidal curves(u and b ) in Fig.4(a), and the upper one is corresponding to one sinusoidal curve(c) in Fig.4(a). Two baseline positions, yo = 100 and yo = 300, are obtained by searching the local maxima. Fig.4(c) shows a 2-D parameter space
3. Experimental results We wrote a computer program in Visual C++ 6.0 to evaluate the above algorithms. Experiments are performed on several synthetic images with and without noise, and some results are described bellow. Fig.3(a) shows an example image of size 360 x 400 with one sinusoidal curve. The sinusoidal curve in the image is created from equation(l), where yo = 200, A = 100 ,and cp = 150'. Then, the proposed method in this paper is used to detect the curve. Fig.3@) shows a I-D voting space with a sharp peak which corresponds
911
A novel method based on the Hough transform is proposed for detecting a kind of fixed period sinusoidal curves. It decomposes a 3-D problem into a I-D problem and a 2-D one, thus results in a significant reduction in storage space and time requirements. Experimental results also show that the proposed method is able to parameterize the curves accurately and presents the robustness to noise. In our present work, this method is used to detect tilted geologic events such as planar fractures and bedding planes i n borehole wall images.
corresponding to yo = 100 ,where there are two peaks. So two sinusoidal curves are detected. Figd(d) shows a 2-D parameter space corresponding to yo = 3 0 0 , where there is one peak. One sinusoidal curve is detected. All the detected parameter values of the sinusoidal curves are identical to the values to create these curves Table 1 The panmeter V B I U ~ S to create three sinusoidal curves Smsoidal curve
so
300
I zn
Reference [I]
P.V.C.Hough, Method and means for recognizing complex patterns. U.S. Patent 3069654, 1962. [2] J.lllingwoRh and J.Kittler, A survey of the Hough transform. Computer Vision, Graphics, and Image Processing 44,87-116, 1988. [3] H.Li, M.A.Lavin and R.J.LeMaster, Fast Hough transform: A hierarchical approach. Computer Vision, Graphics, and Image Processing, 36(2-3), 1090-1095, 1986. [4] J.lllingworth and J.Kinler, Adaptive Hough transform. IEEE Trans. on Pattern Analysis and Machine Intelligence, 9(5), 690-698, 1987. [ 5 ] X.U.Lei, 0.J.A.Errki and P.Kultanen, A , n e w curve detection method: Randomized Hough tran'sform(RHT). Pattern Recognition Letters, I I , 331-338, 1990. [6] M.Atiquzzaman, Multiresolutioin Hough transform - An efficient method of detecting patterns in images. IEEE Trans. on Pattern Analysis and Machine Intelligence, 14(1 I), 1090-1095, 1992. [7] AGoneid, SEI-Gindi and A.Scwisy, A method for the Hough transform detection of circles and ellipses using a Idimensional array. Proceedings of the IEEE International Conference on Systems, Man and Cyhernetics, 4, 31513157, 1997. [SI Y.W.Lei 'and K.C.Wong, Ellipse detection based on symmetry. Pattern Recognition Letters, 20(1), 41-47, 1999. [9] K.Glossop, P.J.G.Lisboa and P.C.Russell et al., An implementation of the Hough transform for the identification and labelling of fixed period sinusoidal curves, Computer Vision and linage Understanding,.74(1), 96-100, 1999 [IO] D.Torres, RStrickland and M.Gianzero, A new approach to determining dip and strike using borehole images, in Proceedings of SPWLA 31st Annual Logging Symposium, 1-20, 1990. [ I I ] B.B.Thapa, P.Hughett and K.Karasaki, Semi-automatic analysis of rock frfcture orientations from borehole. wall images, Geophysics, 62(1), 129-137, 1997.
ma 200
100
0
(a) ......... . . . . .. .. . . . ... .. ... ... . . . . . . . . ... ........ ... . . . . .
(b) . ::. . :.. . . . . . . . . . . . .. .. . . .. .. ... '.. .. : .:, .!.., : . ...... . . . .. . . ..~ . . : ....... ~. .. . .. . .. ...,...
. . . ." j
1
I
:
.,
.
bm 0 0 (C)
lmA
(d)
Fig.4 Example lor detecting several sinusoidal curves in image. (a) Origind image with t h e sinusoidal cuwei. (b) I-D parameter space for locating the
baselines. (c) 2-D parameter space corresponding to y o =loo, (d) 2-D parameter space camsponding to yo = 300.
In order to show the efficiency of this method, we compare it with the SHT. The SHT requires much more time for detecting the fixed period sinusoidal curves from the same image. In the case of detection of the curve in Fig.3(a) with noise; it takes IO milliseconds in first stage, and 120 milliseconds, in second stage with the proposed method. While the SHT needs about 45,345 milliseconds to finish the computation under the same condition.
4. Conclusion
9 12
I
-