F'sLGORITHM FOR COMPUTING THE RCSDON TReNSFORM W I T H SOME CSPPLICfATIONS CSN DISCRETE Ramwah Q . R . .N. 'School o f E l e c t r i c a l Engg., Purdue Uni v e r s i t y , West L a f a y r t t e , I n d i a n a , I N 47907-0501, USA. Dept. o f E l e c t r i c a l Engg., I n d i a n I n s t i tut e o f Science, 560 012, I N D I A . Bangalore - ABS TRAC T The enormous g r o w t h i n the application areas o f t h e Radon T r a n s f o r m and t h e f a c t t h a t d i g i t a l computations a r e o f t e n r e q u i r e d , has .led t o t h e development o f the Discrete Radon T r a n s f o r m ( DRT 1 . T h i s paper prdposes a method f o r c o m p u t i n g t h e DRT b y exploiting t h e converse o f t h e C e n t r a l S l i c e Theorem r e l s t i n g t h e Radon and Fourier Transforms, using t h e FFT a l g o r i t h m . Simulation o f the DRT a l g o r i t h m i s p r e s e n t e d and some applicat i o n s a r e discussed. The p r o p o s e d a l g o r i t h m in t h e Radon c a n be e x t e n d e d f o r f i l t e r i n g Space. 1. K. R a j g o p a l Srinivama Introduction The Radon transform (RT), apart from its key role in the reconstruction of multidimensional signals from their projections (Computer Assisted Tomography C121), is a powerful tool in various image processing and machine vision applications [lo], a s it offers significant advantages for general image representation and manipulations. The Central Slice Theorem which relates the RT (spatial concentrations) of an image with i t s Fourier transform (FT)(spatial frequencies), reinforces the considerations underlying the use of the projection space as a 'Recognition Domain'. Significant features in the image can be detected in a sufficiently sized projection space Cll]. Projection generation is being used to aid feature selection [8,11,14-17]. The Hough Transform (HT) C 7 1 , which is an algorithm for detecting straight line segments in pictures i s a special case of the RT [SI. Tile computation of the RT is thus gaining importance. It is not possible to obtain the R T directly from discrete data. The R T for discrete data has been defined in a number of ways, each suitable to a particular application. Some require the interpolation of the available data values to a dense grid [3,18], and some other require a weighting of the discrete data [11,14]. An approximation to the RT for discrete data has been generally referred to in the literature a s the DRT. However, strictly speaking, the DRT involves a summation of the discrete data along various straight lines in the plane of the grid. This invariably involves an interpolation o f the available data. In many applications, there i s a need for simpler and fast methods for computing the RT. Recently, a -fast algorithm has been proposed for the computation of the DRT by Beylkin C3I based on the formulation given by Scheibner C181. However, the slope intercept form of a straight line used here introduces complications, a s these parameters are not bound. Apart from requiring the storage of a large number of huge 'transform' matrices, this algorithm appears to be fast only for rectangular arrays with one of the dimensions being considerably small and hence suitable for seismic applications. Hinkle et a1.[101 have considered simpler schemes, however, for a special purpose architecture. A new approach to compute the DRT of a digital image using FFT algorithms based on the (converse of) Central Slice Theorem (CST) Cl21 i s explained in the following sections. The emphasis has been to develop a method that i s appreciably fast, of moderate cost, relatively simple and amenable for parallel implementation. The organization of the rest of the paper is a s follows. The CST and its converse are reviewed in the following Soctions. The DRT algorithm i s developed in Section 4, followed by simulation results in Section 5. Some important applications are discussed in Section 6. Section 7 concludes the paper. 2.. T h e Radon Transform Let f(x,y) represent a two dimensional (2-D) function on the plane and F(u,v), its FT. The Radon Tansform of f(x,y) is the integral of f(x,y) along all possible straight lines in the plane containing the function, provided the line integral exists: m m R{f(x,y)>=p(t,B)= il f(x,y)6(t-xcos€J-ysine)dxdy straight line normal form', The t = x cost3 + y sine is represented in its (2) where, ' t ' is the radial distance and 8 , the angle made by the normal. The term 'projection' at an angle 8 refers to the R T p(t,e) will be integral ( 1 ) evaluated at 8. written a s p,(t) to emphasize that a 1-D 4.4.1 78 (1) -m-m CH2766 - 4/89/0000 - 0078 0 1989 IEEE function i s parameter. considered, with 8 as a 5 . The C e n t r a l B l i c e Theormr T h e Central S l i c e T h e o r e m s t a t e r that t h e F o u r i e r Transform o f t h e projection a t a n a n g l e 8 ( t h e R T a l o n g parallel l i n e s at a n g l e 8) denoted by P*(w), i s a central s l i c e o f t h e 2-D F o u r i e r T r a n s f o r m of t h e i m a g e f ( x , y ) , at t h e s a m e a n g l e , 8 : FT(p.(t)) = Pe(w) = F ( w c o s 6 , w s i n e ) (3) Conversely, t h e projection p*( t) may be obtained by using t h e i n v e r s e FT: pl(t)=F-+CPl(w))=F-+( F(wcos8,wsine) 1 (4) Equation ( 4 ) s t a t e s that t h e i n v e r s e F T of t h e 'central' s l i c e of t h e 2-D F T o f t h e i m a g e f ( x , y ) g i v e s t h e projection o f t h e i m a g e a t t h e s a m e angle. It i s t h u s p o s s i b l e t o fill t h e Radon S p a c e by considering several equi-angular slices. polation i s used f o r illustration ( f o r l i n e s passing t h r o u g h t h e l a t t i c e points, interpolation is n o t required and t h e DRT i s obtained by s u m m i n g t h e c o r r e s p o n d i n g d a t a values): i+ XP*(W) = ( X 3 ia1 ( ( k+,l+)/dA(w,8) 1 / d+(w,8) 1 ) (6) XP*(w) a r e t h e s a m p l e s o f t h e F T of x(m,n)ak a n g l e 8 and d i s t a n c e s w (radial frequency) from t h e origin. d i ( w , 8 ) d e n o t e t h e d i s t a n c e s between t h e point ( w , 8 ) o n t h e polar grid and i t s four n e a r e s t C a r t e s i a n neighbors. Fig. l(a) shows the parameters for the definition of linear interpolation. Fig. l ( b ) s h o w s t h e polar r a s t e r indicating t h e s e t of p o i n t s o n t o w h i c h t h e C a r t e s i a n s a m p l e s a r e mapped. T h e d i s t a n c e s d i s need be precomputed and stored o n l y for p o i n t s in t h e f i r s t quadrant, d u e t o symmetry. 3) P e r f o r m t h e i n v e r s e F F T of t h e t h e s e s l i c e s t o get t h e DRT- t h i s can b e d o n e at all a n g l e s i n d e p e n d e n t l y and h e n c e in parallel. 4. D i s e r m t r R a d o n T r a n s f o r m A l g o r i t h m T h e D i s c r e t e Radon T r a n s f o r m ( D R T ) of a digital i m a g e f(m,n) at a n .angle 8, i s t h e sum of t h e v a l u e s of f(m,n) along t h e corresponding orthogonal directions. Definition: CIS a c o n s e q u e n c e of t h e c o n v e r s e o f the Central S l i c e Theorem ( equation (4)) the D R T may be defined in t e r m s o f t h e D F T o f t h e image, a s follows: The DRT o f a d i g i t a l image f(m,n) at Remark: In a local i n t e r p o l a t i o n s c h e m e s u c h a s t h e o n e described above, t h e e r r o r will be independent from point t o point. The above algorithm is efficient a s F F T c a n be used t o c o m p u t e t h e D F T and i s a l s o a m e n a b l e for parallel implementation. It i s i m p o r t a n t t o n o t e that, s u i t a b i l i t y o f an a l g o r i t h m f o r parallel i m p l e m e n t a t i o n i s often a d e s i r a b l e feature, i r r e s p e c t i v e o f t h e exact n u m b e r of c o m p u t a t i o n s involved. an m g l r 9, i s t h e i n v e r s e DFT o f t h e samples on the central slices o f a t t h e same a n g l e 8. t h e 2-D DFT o f f(m,n), The above definition provides the basis t h e c o m p u t a t i o n of t h e D R T from t h e D F T o f f(m,n). T h e a d v a n t a g e of s u c h a method i s efficiency, s i n c e F F T a l g o r i t h m s c a n b e used t o c o m p u t e t h e DFT. S i n c e t h e 2-D D F T corr e s p o n d s t o t h e s a m p l e s of t h e (2-D) F T of the image on a Cartesian grid, it i s required t o m a p t h e s a m p l e s o n t o a polar ramter. A s i m p l e method i s i n v e r s e d i s t a n c e linear interpolation. However, it i s important t o n o t e that t h e a c c u r a c y of t h e technique d e p e n d s o n t h e t y p e of interpolation used. T h e s t e p s in t h e method are: for 1) C o m p u t e t h e 2-D D F T i m a g e x(m,n)r X(k,l) of the & ~ x ( m , n ) e - ~ c 3 m / N )c r n k - i n ) , k,l=1,2,..N (5) T h i s c a n be d o n e by first c o m p u t i n g t h e t r a n s f o r m s o f t h e r o w s ( in parallel ) 81 t h e t r a n s f o r m s of t h e c o l u m n s o f t h e result ( in parallel using F F T algorithms. X ( k D 1 )= msln., 2 ) C o m p u t e t h e central s l i c e s of t h e 2-D DFT. This requires a mapping of the samples o f t h e F T from t h e C a r t e s i a n r a s t e r o n t o a polar raster. I n v e r s e d i s t a n c e linear interpolation i s used f o r illustration ( f o r lines passing through t h e lattice points, inter- Remark: f3 s i m i l a r a p p r o a c h f o r t h e c o m p u t a tion of t h e R T h a s been c o n s i d e r e d by M u r p h y E131, however, in t h e c o n t e x t of linear feature enhancement in SFIR images. Very r e c e n t l y , a t r a n s p u t e r i m p l e m e n t a t i o n has been developed f o r t h e s a m e C91. 3. S i m u l a t i o n S i m u l a t i o n r e s u l t s o n a c o m p u t e r generated test i m a g e of s i z e 64x64 a r e s h o w n ,in figs. 2-4. Fig. 2 s h o w s t h e i m a g e u n d e r consideration. Figs. 3(a)-(d) s h o w t h e project i o n s o b t a i n e d by t h e weighted s u m m a t i o n s c h e m e using t h e 'pixel' a s s u m p t i o n , a s outlined by B a r r e t [2]. T h e w e i g h t s h a v e been s e t equal t o t h e l e n g t h s of i n t e r s e c t i o n of t h e l i n e s ( 2 ) w i t h t h e p i x e l s assumed around t h e C a r t e s i a n grid points, in o r d e r t o c l o s e l y a p p r o x i m a t e (1). Figs. 4(a)-(d) s h o w t h o s e c o m p u t e d by t h e proposed D R T algorithm. It may be observed t h a t at a n g l e s c o r r e s p o n d ing t o t h e F o u r i e r s l i c e s away from t h e axes, t h e p r o j e c t i o n s c o m p u t e d by t h e proposed D R T a l g o r i t h m d o n o t c o m p a r e well w i t h t h o s e of fig. 3. T h i s can b e attributed to the following: ( 1 ) T h e p o i n t s within t h e c i r c l e inside the Cartesian frequency raster are c o n s i d e r e d , w h i c h a m o u n t s t o t r u n c a t i o n ( see fig. l.l(b) ) . T h i s e f f e c t b e c o m e s s e v e r e for s l i c e s f a r a w a y from t h e axes. T h i s may be minimized by c o n s i d e r i n g all t h e u n i f o r m l y spaced p o i n t s a l o n g t h e s l i c e s so a s t o en- 4.4.2 79 c o m p a s s t h e e n t i r e s q u a r e raster. ( 2 ) As mentioned earlier, s i m p l e linear interpolat i o n m a y n o t b e s u f f i c i e n t t o a c c u r a t e l y RSt i m a t e t h e p o l a r samples, e s p e c i a l l y i n t h e c a s e o f images with considerable high f r e q u e n c y content. T h i s is a . l i m i t a t i o n of t h e proposed algorithm. H o w e v e r , a high d e g r e e o f a c c u r a c y i s n o t required in many applications. . 6. applieationm The H o u g h T r a n s f o r m ( H T ) h a s been r e c o g n i z e d in t h e l i t e r a t u r e a s a s p e c i a l c a s e o f t h e RT. However, s t r i c t l y speaking, i t i s t h e D R T w h i c h i s c l o s e r t o t h e H T than t h e RT. T h i s c a n b e a p p r e c i a t e d f r o m t h e f a c t t h a t t h e D R T ( a n d n o t t h e R T ) o f a binary i m a g e r e d u c e s t o i t s HT. T h e conventional H o u g h t e c h n i q u e i s limited by s l o w s p e e d and e x c e s s i v e m e m o r y requirements. In a d d i t i o n , a s S u t e r C l 9 1 h a s pointed o u t , o n e o f t h e d e f i c i e n c i e s o f t h e H T i s a d i s t o r t i o n in t h e s h a p e a n d t h e location o f t h e p e a k s in t h e parameter ( T r a n s f o r m s p a c e , w h i c h may b e e l i m i n a t e d by t h e u s e . o f t h e DRT. The proposed D R T a l g o r i t h m c a n r e p l a c e t h e H o u g h T r a n s f o r m a t i o n s t e p in a s t r a i g h t line detection scheme, making i t very efficient. Recently, D. C a s a c e n t and R . Krishnapuram C41 h a v e d e v e l o p e d a t e c h n i q u e w h i c h i s a n e x t e n s i o n o f t h e H T , t o d e t e c t and l o c a t e c u r v e s in images. T h i s a l g o r i t h m a v o i d s t h e e x t e n s i v e pre-processing and h i g h dimens i o n a l i t y o f t h e H o u g h S p a c e t h a t i s required in t h e r e c e n t m e t h o d s in g e n e r a l i z i n g t h e H o u g h T r a n s f o r m Cl]. T h e proposed a l g o r i t h m s e r v e s 'as a f a s t and e f f i c i e n t ( a n d p a r a l l e l ) i m p l e m e n t a t i o n o f t h e H o u g h s c h e m e and c u r v e d o b j e c t recognition. T h e D R T a l g o r i t h m d e s c r i b e d a b o v e may b e extended f o r filtering in t h e R a d o n S p a c e , a s follows. T h e c o n v o l u t i o n theorem in t h e R a d o n S p a c e E61 s t a t e s that t h e R T of t h e c o n v o l u tion o f a f u n c t i o n f(x,y) w i t h a filtering f u n c t i o n h ( x , y ) is t h e c o n v o l u t i o n of t h e i r p r o j e c t i o n s p m ( t ) and h*(t), respectively, f o r all 8: RT(f(X,y)tth(X,y))=p,otha(t)~h~(t)=P~'(t) (7) In t h e f r e q u e n c y domain: P ~ ' ( w ) = Hm(w)Pm.(w) (8) Step-2 of t h e D R T a l g o r i t h m may b e a s a weighting m o d i f i e d by i n t r o d u c i n g H,(w) factor t o obtain the samples of the F T of the filtered f u n c t i o n o n a p o l a r grid: He(w) P*'(w) = 2, 9( i = 1 X(k+,l+)/d+(w,B) (9) 1 1 d+(w,e) 1' By t h e C S T , P',(w) f o r m s a central s l i c e of t h e (2-D) F T o f t h e f i l t e r e d image f'(x,y), w h i c h may be o b t a i n e d by d i r e c t F o u r i e r i n v e r s i o n technique. T h u s , 2-D linear shift-invariant f i l t e r s c a n be r e a l i z e d by a s e t of d e c o u p l e d 1 - D filters, by working in t h e R a d o n Space. .The s c h e m e is illustrated in fig. 5. T h i s t e c h n i q u e is particularly useful for imp 1 emen t ing 2-D c i rcu 1 a r 1 y s y m m e t r i c f 1 1 ters. T h e technique outlined above suggests a p p l i c a t i o n t o multi-directional filtering, a topic t h a t h a s n o t received m u c h attention. pernark: T h e proposed a l g o r i t h m i s a m e n a b l e t o t r a n s p u t e r i m p l e m e n t a t i o n C91. 7 . Summary O n e f f i c i e n t a l g o r i t h m f o r t h e computat i o n o f t h e D R T h a s been presented. I t s application f o r t h e d e t e c t i o n o f s t r a i g h t line segments and extension for curved object recognition h a v e been discussed. The 4190rithm i s a m e n a b l e f o r parallel implementation, a c u r r e n t trend in signal and i m a g e processing. A modification o f t h e algorithm f o r f i l t e r i n g in t h e Radon S p a c e h a s been proposed. REFERENCES C13 D.H. Ballard and C.M. Brown, "Computer Vision", Englewood and Cliffs, 1 9 8 2 C21 H.H. B a r r e t t and W. Swindell, "Radiological Imaging" vol. 2, Academic P r e s s , 1981. C31 G. Beylkin, " D i s c r e t e R a d o n Transform", IEEE Trans. ASSP, Feb. 1987, pp: 162-172. C41 D. C a s a s e n t and R . Krishnapuram, "Curved Object L o c a t i o n by H o u g h T r a n s f o r m a t i o n s and Inversions", P a t t e r n Recognition, Vol. 20, No. 2, 1987, 181-188. E51 S . R . Deans,"'Hough Transform from t h e 1981, Radon Transform", IEEE Trans. PAMI-3, pp: 185-188. C61 S . R . Deans, " T h e R a d o n T r a n s f o r m and s o m e o f i t s Applications", N e w York: Wiley, 1983. [7J R.O. D u d a a n d P.E. Hart, "The Use of H o u g h T r a n s f o r m T o D e t e c t L i n e s and C u r v e s in Vol. 15, No. Pictures", Comm. o f t h e A.C.M., 1, Jan. 1972. CBI Y . X . G u e t al., "Application of Multilevel D e c i s i o n T r e e in C o m p u t e r Recognition o f C h i n e s e C h a r a c t e r s " , I E E E Trans. P a t t e r n Anal. and Mach. Int., Vol. PFIMI-5, No. 3, 1983, pp :83-89. "Transputer Implementa[91 G. Hall e t al., tion o f t h e R a d o n Transform for Image Enhancement", Proc. lCASSP'B9, pp:1548-1551. Cl01 E.B. H i n k l e e t al., " PzE: A New Life for P r o j e c t i o n Based I m a g e Processing.", J1. o f Parallel and Dist. Comp.-4 , 45-78, 1987. C111 0. I b i k u n l e e t al., "Numerical Recognition Using T h e R a d o n Transform And Relaxation Matching", Digital P r o c e s s i n g of S i g n a l s in 22-26, April Communications, Loughborough, 1 9 8 5 ; I.E.R.E. Pub.No. 62. Cl21 R.M. M e r s e r e a u and A.V. Oppenheim, "Digital Reconstruction o f Multidimensional Signals From Their Projections", Proc. IEEE, Vol-62, pp. 1319-1338, Oct. 1974. L131 L.M. M u r p h y , " L i n e a r Featu're Detection and E n h a n c e m e n t in Noisy I m a g e s via t h e R a d o n Transform", Pattern Recognition Letters, pp:279-284, 1986. Cl41 N.M. Nasrabadi e t al., " A N e w Detection T e c h n i q u e in Noisy Images", in Proc., Digital Processing of S i g n a l s in Communications, L o u g h b o r o u g h University, UK, 1985, pp:237244. C151 M.A.. P a v e l , " A Unified Settiny for P r o j e c t i o n s in P a t t e r n R e c o g n i t i o n " , Pattern R e c o g n i t i o n , vol. 10, 1978, pp 249-254. 4.4.3 80 POLAR SnflPLE Fig. d Fig. l(a) -- -- '-70 . 2: The T e s t Image 60 7 NXN c ARTESIAN SupPonr 40 20 k CC) Fig. e = 600 l(b) I 1161 T. Pavlidis, "Computer R e c o g n i t i o n o f Figurms Through D e c o m p o s i t i o n " , Information and C o n t r o l - 1 4 , 1968, pp:526-537. Cl71 T. Pavlidis, " A l g o r i t h m s f o r Shape Analysis o f C o n t o u r s and Waveforms", Proc. Fourth I n t . Conf. on P a t t e r n R e c o g n i t i o o , Kyoto, Japan, 1978, ppr70-E5. Cl83 D.J. Scheibner, "The D i s c r e t e Radon Transform W i t h Some A p p l i c a t i o n s t o V e l o c i t y Estimation", EE Tech. R e p o r t 8301, March 1981, R i c e U n i v e r s i t y , Texas. Cl91 B.W. Suter, "6 P a r a l l e l Algorithm f o r t h e D i s c r e t e Radon T r a n s f o r m " , P r o c . Computer A r h i t n c t u r e f o r P a t t e r n A n a l y s i s and Image Data Base Management", pp: 394-398, 1985. loo 30 20 0 40 20 50 Modi t iod 1ntorp1n.- . Polar-Rect. I nt o r p l n - 2-D IFFT , f'(m),n) Fig. 5 4.4.4 81