Fast Mapping using the Log-Hough Tansfomation B. Giesle, R. Gaf, R. Dillmann Institute fo Pocess Contol and Robotics (IPR) Univesity of Kalsuhe D-7618 Kalsuhe, Gemany fgieslejgafjdillmanng@ia.uka.de C.F.R. Weiman fomely at HelpMate Robotics, Inc. Shelte Rock Lane Danbuy, CT, 06810, USA weiman@pcnet.com Abstact: Envionment mapping is a vey complex pocedue that equies high CPU pefomance. Fo the last few yeas, lase scannes have becomemoe and moe impotant fo mobile obots. Using thei data equies many tansfomations between dieent coodinate systems. This new appoach deals with a mapping within the coodinate system of the scanne, theefoe it is vey fast. The Log-Hough Tansfomation pefoms line nding in scans in a vey ecient way, whichspeedsupmapping. 1 Intoduction Mobile obot navigation depends on the knowledge of the envionment. Theefoe nealy all obots un a mapping task to geneate o impove thei maps. Fo map epesentation, usually the Catesian coodinate system is pefeed because it allows the epesentation of envionment featues independent fom the obot's position. If mapping is done in an indoo envionment (which is assumed fo this aticle), the featues themselves ae most often epesented by line segments. In the last few yeas, vey fast and pecise lase scannes have become the most impotant senso fo mobile obots fo all navigation tasks, such as collision avoidance, position coection and mapping. The last two poblems have to be solved in the Catesian coodinate system of the envionment. This equies a poweful compute, since the data of the scanne is given in pola coodinates and each scan has to be tansfomed. Pesent solutions tansfom evey single point ofthe scan and then extact the edges. The new appoach pesented in this pape deals with edge extaction in the egocentic pola coodinate system of the lase scanne. Theefoe only the detected edges have to be tansfomed, which saves a lot of CPU powe. Conventional line detecton The main poblem of navigation based on lase scanne data is to connect the single points obtained fom the scanne to edges suitable fo use by the obot. Figue 1 shows such a scan. Seveal algoithms exist to extact edges fom point data which has been tansfomed into the Catesian system. Line tacking. This algoithm, as descibed in [8], successively pocesses all points fom the scanned set, geneating a line equation. This equation is iteatively impoved as points ae found to lie on the postulated line. The measuement eo of a point espective to the line is computed using a least squaes method. Then it is tested against a cetain theshold to nd out if the cuently examined point lies on the line. When the eo is geate than the theshold, the line is teminated at that point, and a new line is stated. Figue 1: Single lase scan Iteative endpointt. A line is geneated connecting the st and last point of the set of points. The point with the geatest othogonal distance towads the line is detemined. If the distance is lage than a theshold, the line is split in two, connecting the end-
points of the pevious line with the newly found point. The set,too, is split in half at the point's position. This yields two sets and two lines connecting the espective st and last points of the sets. Then the algoithm is ecusively applied to those two set-line pais. This method is also descibed in [8] and [6]. 3 Pogessive line detecting The tansfomation fom the pola into the Catesian coodinate system can be avoided using an algoithm that does not change the type of the coodinate system. 3.1 The Hough Tansfomation This method was poposed in 196 by Paul V.C. Hough[4] to automatically detect the complex tacks of subatomical paticles in photogaphs obtained fom a bubble chambe. The basic idea is to tansfom a single point into the paamete space of the set of innite lines unning though it. This paamete space is called Hough space. In the basic fom pesented hee, the Hough tansfomation detects staight lines only. But as pointed out in [7], the appoach can be genealized to detect abitay pictue elements. The Hough tansfom has been used fo automatic mapping and obot localization in a numbe of pojects, such as [] (to detect edges in occupancy gids obtained fom ultasonic senso output) and [5] (using a ange-weighted vaiant fo lase scanne based localization). In the scanne-centeed pola coodinate system of a lase scan, a line is given by the function d() = cos( ; ) (1) whee is the length of the othogonal fom the coodinate system's oigin to the line, and is its inclination (see gue ). The paamete pai ( ) yields a single point in Hough space. Examining a single point (d1 1) fom the lase scan, the paamete function fo all lines passing though this point can be found by solving equation 1 fo. This yields () =d1 cos(1 ; ) () fo vaiable. Equation is called the Hough Tansfomation of a single point. Thus, the Hough Tansfomation of a line is a point, and the one of a point is a cosine cuve. Setting up the line paamete equation fo a second point (d ), an angle 0 can be detected with (0) =d1 cos(1 ; 0) =d cos( ; 0) (3) The pai ((0) 0) is the paamete pai that species the staight line though (d1 1) and(d ). Its d( α) α φ Figue : A line in pola coodinates with the specifying paametes coesponding point in Hough space can be found by plotting the scaled cosine cuves (obtained fom equation fo (d1 1) and (d )) and detemining thei intesection. Note that the second intesection point ((0 + ) 0 + ) can be ignoed because it yields the same line equation. See gues 3 to 5 fo an illustation. d y α Figue 3: The points p1 =(d1 1) andp =(d ) Using this method, the equation fo the line connecting an abitay numbe of collinea points can be found by tansfoming all the points into Hough space and detemining the positive intesecting point ofthe esulting cosine cuves. If the intesection seach is limited to detect only the intesecting points of moe than a cetain numbe of cuves, the Hough tansfom becomes vey toleant with espect to noise. Unfotunately, in implementation, the Hough tansfom is not only obust and noise-toleant but also faily expensive in tems of memoy and CPU time. The eason fo the memoy disadvantage aises fom the fact that the Hough space has to be discetized in ode to facilitate intesection seach. The eason fo CPU time consumption lies in the need to e-compute the cosine cuve fom equation fo evey single point. α 1 d 1 x
y φ 1 ( φ) Figue 4: The paametes of the line sets though p1 and p π 3π/ π π/ 0 φ (φ) 1 (φ) Figue 5: The epesentation of the paamete functions 1() and () in Hough space 3. The Log-Hough Tansfomation x The Log-Hough tansfomation as poposed by Weiman [11] is a modication of the Hough method. It geatly educes both the amount of memoy and the complexity of calculations equied. This is achieved by pefoming all calculations not in a egula pola coodinate system but its logaithmized vaiant. Additionally, the used system is special in tems of being isotopical, i.e. the scale is equal to both axes. The demand fo isotopy stems fom the oigins of the method: It was oiginally developed fo pocessing data obtained fom cameas with exponentially aanged CCD cells (see [10]), whee such a coodinate system facilitates pictue zoom and otation simply by index shift. The scale of the axis is given by the angula esolution of the scanne. Theefoe the tansfomation is chosen such that the scale of the axis is endeed appopiately. This is done by dividing the distance d by the inne measuement limit 0, yielding equation 4 fo the tansfomation into the log-pola coodinate system and equation 5 fo the backwads tansfomation. Note: Fo the pupose of the expeiments conducted, the natual logaithm is used, so the exponentiation in the backwads tansfomation is witten as e x. In pactice, howeve, any base can be used. d log =log( d ; 0 ) (4) 0 d = 0e d log + 0 (5) The application of this tansfomation changes the staight-line paamete equation to log () = log( () 0 ) = log(d) ; log(0) + log(cos( ; )) (6) Fom this equation, it can easily be seen that the point values d and now only act as shifting paametes fo the cuve the geneal shape stays the same, namely that of a logaithmized cosine cuve. Theefoe the implementation only needs to compute and discetize the cuve exactly once. This pefabicated cuve is deposited in a look-up table which is then plotted into Log-Hough space fo each scan point, shifted by the point's paametes. Afte tansfoming an entie scan, the intesection points ae found in Log-Hough space. Fo each intesection, the angula paamete of the esulting line equation can be deived diectly fom the intesection's coodinate. The distance paamete is obtained by tansfoming the log coodinate using equation 5. In implementation (i.e. in a discetized gid with k cells in adial diection), the logaithmic distance coodinate is expessed as d log = n whee is the angula esolution of the scanne and n is the cell numbe that contains the detected intesection. It emains to be noted that the linea discetization of Log-Hough space esults in an exponentially polifeated discetization of eal space. Theefoe, accuacy deceases fom the cente ing (distance 0 fom the scanne) outwad. Howeve, since the aea of geatest inteest is about m in font of the obot, this is not a geat disadvantage, especially when compaed to the ate of data eduction that esults fom the logaithmized as opposed to the standad Hough tansfom. Fo an example, see section 5.3. 3.3 Temination Afte all innite lines existent in the scan have been extacted, thei espective stat and end points ae found by again iteating ove the entie scan and testing the distance of each point to each line against a theshold. 3.4 Uncetainty computation To detemine the uncetainty of the edge segments' popeties, st the covaiance matix fo the point
( ) has to be detemined. Unfotunately, thisisnot tivial. Linea egession in the pola coodinate system is unsatisfactoy due to the non-linea elationship of the paametes, and the tansfomation of all geneating points of a segment into the Catesian system would emove all the benets gained by the Log-Hough tansfom. Instead, a simple appoximation is used: The Log- Hough algoithm can be viewed as nding clustes in ( d )-space with d = d ; cos( ; ) and (7) = ; + accos( ): (8) d Now thevaiances of and can be set equal to the vaiances of d and as detemined by nx nx = 1 (d i ; n i=1 cos( i ; ) ; d) (9) = 1 ( i ; accos( )+; ) (10) n d i=1 i whee d = npn 1 i=1 d i and = npn 1 i=1 i. Then the covaiance matix of the point ( ) can be set to 0 ( ) = 0 (11) This is a vey ough estimate that has been chosen puely fo pefomance easons, but it pefoms well in pactice. A dieent appoach would be to calculate the popagation of the single points' covaiances to the covaiances of each of the geneated paamete points. Then, instead of discete Log-Hough lines with height 1, lines made up of the appoximated Gaussian covaiance cuves would be plotted. This would make it possible to obtain the uncetainties of the extacted lines diectly fom Log-Hough space. We ae cuently investigating this appoach to nd an ecient way to implement it. Afte the vaiances of ( )have been found, the point and the line's nomal vecto ae conveted into the Catesian system and thei covaiance matices ae found. This infomation is used to paameteize the edge segment with stat and end points, mid pointand nomal vecto. 4 Mapping Mapping is done in a Catesian coodinate system with (0 0) at the point whee the obot was located when the mapping pocess was stated. Matching of aleadymodeled edges with those fom a lase scan is done using the Mahalanobis distance[8], taking the edge featues' covaiances into account. Afte an edge fom the wold model has been successfully matched with the coesponding edge fom a new lase scan, the modeled edge is ened using a discete-time Kalman lte[9]. Anothe Kalman lte is used to educe the uncetainty in the obot's own dead-eckoning-based position estimation. The esulting mapping algoithm poduces a eliable model of a static envionment. Methods fo eaction to dynamic envionments have not been integated yet, but ae subject to investigation. 5 Expeimental esults This algoithm was tested with two dieent types of lase scannes. Afte a shot desciption of the scanne hadwae, an example is pesented. 5.1 The scanne Figue 6 shows the used scanne models. On the left hand side, the Sick PLS can be seen. This scanne pefoms a time-of-ight measuement with an accuacy of 5.1cm at a distance of up to m and 13.1cm beyond that. Figue 6: The scannes fom Sick and TRC The othe scanne shown is the HelpMate Light- Range. This unit is tted with a lase emitting/detecting device fom Acuity Reseach [1], which emits a squae wave whose pulse width is modulated by the time of ight of the lase beam deected fom a otating mio. This squae wave is sampled by an evaluating unit, tansfoming the pulse width into ange eadings. Accuacy evaluations have shown the LightRange's ange output to have an accuacy of about 6.7cm egadless of distance to the measued object. 5. Edge extaction using the Log- Hough Tansfom In this section, a shot demonstation will be given on the esults obtained using the Log-Hough Tansfomation. On the left side of gue 7, the state of the
Log-Hough gid afte tansfoming all the points fom gue 1 is depicted. Figue 8: Edge segments extacted fom gue 1 using the Log-Hough tansfomation. Figue 7: The Log-Hough space and its line maxima fo gue 1 The ight side of gue 7 shows the maxima of the discetized Log-Hough space's lines this plot could be descibed as a \side view" of Log-Hough space. Fist, the peak-seaching algoithm looks fo peaks in this one-dimensional gid to detemine the angula position of the espective peak. Then it nds the adial position by using the same one-dimensional maximum seach on the coesponding line of Log-Hough space. Finally, afte the peaks have been detemined and the coesponding lines have been teminated, the edge segments ae tansfomed into a Catesian coodinate system. This yields the edge segments shown in gue 8. 5.3 Data eduction To see the facto of data eduction that aises fom using the Log-Hough algoithm as opposed to the standad Hough tansfom, an example shall be given using some standad paametes. Memoy eduction. It is assumed that the aea of inteest stetches fom 0 = 50cm to 1 =1 000cm o 10m in adial diection and encompasses 360 of angula eld of view. The angula esolution of the lase scanne be =1=. Discetization of this aea with a minimum accuacy of 1cm in standad Hough space equies a gid of (1 000 ; 50) 360 1 =684 000 (1) memoy cells. If a cell size of a single byte is used, this gid is pohibitively lage fo manyembedded systems. Examining the gid equied fo a Log-Hough tansfomation with the same paametes, it can be found fom the discetized fom of equation 5 that 1 ; 0 0 = 950 50 = ek 1 : (13) Theefoe the numbe of ings is k = dlog(19)=0:5 e = 338 if the natual logaithm is used. Multiplied with the numbe of angula wedges, this yields a gid size of 338 360 1 = 43 360 (14) memoy cells, o a data eduction of almost the facto 3. The esolution of this Log-Hough gid computes to d0 = e ; e =0:0088m (15) o about 9mm in the innemost and d1 = e 338 ; e 337 =0:1659m (16) o about 16.6cm in the outemost ing. So the minimum esolution has been etained close to the senso, and in 10m distance the esolution is about 1.3 times the vaiance of the PLS at that ange, o.5 times the vaiance of the LightRange.
Calculation eduction. Compaed to the commonly-used algoithms to extact edges, the Log-Hough tansfom saves CPU powe as well. The eot of the line tacking algoithm is O(n). It is slowed down, howeve, by the tansfomation of the lase scanne data into the Catesian coodinate system. The least squaes method is vey expensive also. The iteative endpoint t has the eot O(n log n), and it also equies a coodinate tansfomation. The Log-Hough method as pesented in this pape is an algoithm with eot O(n), but without anycomplex coodinate tansfomations, making it the fastest algoithm available fo the extaction of edges fom lase scanne data. 6 Conclusion and futue wok This new appoach speeds up edge extaction signicantly, especially since it is apt fo ealization in hadwae due to the lack of complex tansfomations equied. It is theefoe ideal fo automated mapping and position coection. Cuently only D-mapping is ealized. Fo the futue, it is planned to integate some kind of thee-dimensional senso into the system, extending the Log-Hough method to fully encompass theedimensional space. The senso used fo this will pobably be a Donie EBK lase scanne. Anothe eld of inteest with this algoithm will be position coection. This can be achieved quite easily by detecting pincipal peaks in Log-Hough space and tacking thei oset ove seveal scans. ACKNOWLEDGMENTS Many thanks ae due to HelpMate Robotics Inc. in Danbuy, CT, USA, whee much of the wok fo this pape was conducted, and to the company's founde Joseph Engelbege, who oeed us that possibility. We ae especially indebted to Cal Weiman, Ph.D., who invented the Log-Hough tansfomation with the aid of NASA and NSF funding [3][11], and who supevised the wok at HelpMate Robotics. Without his help, this wok would not have been possible. The nal pats of the wok wee pefomed at the Institute fo Pocess Contol and Robotics (IPR), Pof. D.-Ing. U. Rembold, Pof. D.-Ing. H. Won, Pof. D.-Ing. R. Dillmann, Faculty fo Compute Science, Univesity of Kalsuhe. Refeences [1] Inc. Acuity Reseach. AccuRange 3000-lv and AccuRange 3000-li Use's Manual. Technical epot, Publication of Acuity Reseach, Inc., Menlo Pak, CA, USA, Aug 1993. [] J. L. Cowley B. Schiele. A compaison of position estimation techniques using occupancy gids. In Robotics and Autonomous Systems, volume 1, pages 163{17, 1994. [3] S.J. King C.F.R. Weiman. Log Hough Tansfom Featue Detecto, Phase I SBIR Final Repot, NASA Contact No. NAS 9-18489. Technical epot, HelpMate Robotics Inc., 1994. [4] Paul V.C. Hough. Method and Means fo Recognizing Complex Pattens, U.S. Patent No. 3,069,654. Technical epot, HelpMate Robotics Inc., Dez 196. [5] A. Wenesson: J. Fosbeg, U. Lasson. Mobile Robot Navigation Using the Range-Weighted Hough Tansfom. In IEEE Robotics & Automation Magazine, Ma 1995. [6] Weckesse P. and Dillmann R. Senso-fusion of intensity- and laseange-images. In Poceedings of IEEE Intenational Confeence on Multisenso Fusion and Integation fo Intelligent Systems, pages 501{508. Washington, USA, 1996. [7] P.E. Hat R.O. Duda. Use of the Hough Tansfomation to Detect Lines and Cuves in Pictues. In Communications of the ACM,volume 15, pages 199{18, 197. [8] P.E. Hat R.O. Duda. Patten Classication and Scene Analysis. John Wiley and Sons, 1973. [9] Geoge M. Siouis. An Engineeing Appoach to Optimal Contol and Estimation Theoy. J.Wiley & Sons, 1983. [10] Cal F.R. Weiman. Exponential Senso Aay Geomety and Simulation. In Poc. of the SPIE Conf. on Digital and Optical Shape Repesentation and Patten Recognition, Ap 1988. [11] C.F.R. Weiman. Application of Log-Hough Tansfom to Lida Navigation, Phase I SBIR Final Repot, NSF Awad No. III-9361990. Technical epot, HelpMate Robotics Inc., 1994.