A Fast Vsual Trackng Algorthm Based on Crcle Pxels Matchng Zhqang Hou hou_zhq@sohu.com Chongzhao Han czhan@mal.xjtu.edu.cn Ln Zheng Abstract: A fast vsual trackng algorthm based on crcle pxels matchng s presented n ths paper; ths algorthm fused the deas of correlaton-based trackng method, seral smlar detecton algorthm and feature-based trackng method. The Crcle pxels are adopted as feature pxels set, so t doesn't have hgh calculaton cost to extract the feature pxels. Based on usng the dea of seral smlar detecton algorth ths algorthm adopts coarseto-fne strategy to search the correct target poston, coarse stage s used to decde the preparatve matchng wndows and fne stage s used to decde the fnal correct wndow. Fnally, normalze cross-correlaton functon s used to decde the template change strategy. Smulatons show that ths algorthm not only could track stably, but also the computatonal cost s greatly decreased. Compared wth correlaton-based trackng method and seral smlar detecton algorth ths algorthm has superorty n calculaton cost. Keywords: Vsual trackng; Correlaton trackng; Image matchng Introducton In mage trackng area, correlaton-based method [,] s a conventonal one whch can track complex target under the complex background, at the same tme, t doesn't need to segment mage, so mage segmentaton s avoded. But correlaton-based method has a hgh computatonal cost, n general, the specal complex hardware should be desgn to track target n real tme. So, many methods have been presented to decrease the computatonal cost, seral smlar detecton algorthm [3] (SSDA) s one of these methods. Because correlaton-based method calculates correlaton coeffcent for every pxel n the search area wth no dstncton, lots of calculatons are requred n non-matchng pxels, but frstly SSDA calculates the error cumulatng between preparatve matchng wndow pxels and template wndow pxels n the trackng area. If the error cumulatng has acheved a threshold before all pxels n wndow were detected, ths wndow won't be matchng and the next wndow wll be detected, f the error cumulatng ncreases very slowly, the number of detected pxels achevng a threshold wll be recorded. At last, the maxmum number of wndow wll be the correct wndow after all wndows have been detected. Ths method has only a lttle computaton for obvous non-matchng wndow, so t decreases computaton cost greatly. Another conventonal trackng method s feature-based method [,4]. These knds of methods extract target features, for nstance edge, pont, lne and nflexon and so on, as a matchng measure, t only need a lttle computatonal cost. The general method extracted features are: usng LoG [5] or Canny [6] to detect edge or lne, usng wavelet transformaton [7] or mathematcs morphology [8] to extract the pont or nflexon, there s a great deal of computaton n these pxel-level performances. Based on the deas of the above method, n ths paper, a fast vsual trackng algorthm based on Crcle Pxels Matchng (CPM) s presented. Ths algorthm doesn't need a great deal of computaton n extractng features, at the same tme. Based on the SSDA, ths algorthm adopts coarse-to-fne strategy to search the correct target poston, coarse stage s used to decde the preparatve matchng wndows and fne stage s used to decde the fnal correct wndow. Fnally, normalze cross-correlaton functon s used to decde the template change strategy. The remander of ths paper s organzed as follows: secton descrbes algorthm n detal, secton 3 gves the expermental results, and compared wth correlaton-based method and SSDA, and secton 4 s the concluson.
Algorthm. Crcle pxels selecton In tradtonal mage trackng, tracked target s always needed to smplfy later processng. For nstance, target should be thresholdng before calculatng target centrod n centrod trackng method, n feature-based method, after extractng the features, such as edge or pont, matchng can be performed. Image segmentaton wll always be met n these smplfed processng; ths wll result n bad thresholdng, bad edge or pont extracton. If the tracked target has complcated shape or gray level, smplfy processng wll be more dffcult. Because target surface gray level dstrbuton s dfferent from backgrounds, especally, when target has a complcated gray level surface dstrbuton, there wll be more dfference between target and backgrounds. So, a part pxel of target surface can be chosen as feature pxels to perform trackng. There are many methods to choose feature pxels, the method presented n reference [9] s very complcated and has a hgh computatonal cost. Because human vson cells are crcle dstrbuted n retna, crcle pxels were adopted as feature pxels n ths paper. Crcle pxels are a set of ponts, whch are all on a crcle edge, the center of the crcle s the template center, and the crcle s not out of the template. The feature ponts set are composed of all these crcle pxels. Because mage pxels are arrayed n matrx for at frst, the crcle pxel poston that the center of the crcle s fxed n mage must be defned. Ths poston can be calculated by usng the Chamfer transformaton [0], there are two templates to calculate, one s 3-4 template, another s 5-7- template. In ths paper, 5-7- template s adopted because t has only ± % error wth real Eucld dstance, but 3-4 template has ± 8%.. Algorthm step Algorthm has 3 steps: frstly, coarse search s to elmnate the obvous non-matchng ponts and choose the preparatve matchng ponts. Then, fne search s to decde the correct target poston from the preparatve matchng ponts as target current poston. Fnally, changng template s to decde the template used at the next trackng step... Coarse search Pont ( to be match wth the center of the crcle pxels s searched n search area, here, Pel Dfference Classfcaton [] (PDL) s chosen to defne the smlarty between two matchng ponts, t s p A = D( f, f ) () =, D( f, f ) = 0, f f f f T > T () Where, f = f( x, y ) means the th crcle pxel n template, sum of the crcle pxels s p; f mn, ) = f ( x + y + ) means, one of the ponts ( n belong to the crcle pxels that the center of crcle s ( n search area s corresponded wth the th crcle pxel n template, sum of these pxels s also p. T s a threshold, f the gray absolute dfference between the prepared match pxel and the correspondng crcle template pxel s less than T, these two pxels are matched and value s, f t s not less than T, these two pxels are not matched and value s 0. If there s a hgher number of matchng pxels wth the crcle template pxels, that s A s bgger, the more potental the wndow correspondng to pont A s the correct wndow ncludng target. But because of nose and target movement states change, the maxmum of A s not always the correct match pont. Despte ths, n the matchng area, A always has a bgger value, so S, a threshold, s selected. If A S, pont ( s reserved as a preparatve matchng pxel at the next step. If A <S, pont ( s deleted as a non-matchng pxel and does not process any more. So, lots of computatonal cost s decreased. After coarse search, the reserved preparatve matchng pxels are only 5-5% of all search area pxels... Fne search After coarse search, number of match pxels s calculated by usng full template n the preparatve matchng pxel, and the maxmum pont poston s the correct match poston. The formula to calculate the match pont number by usng full template s the same as the formula by usng crcle pxels. The formula s the followng one: M x= N B = D( f ( x, y), f ( x + y + ) (3) y=, D( f( x, y), f( x+ ) = 0, f ( x, y) f ( x+ T f ( x, y) f ( x+ > T (4) Where, f ( x, ) s template pxel gray-level, template y
sze s M N ; f ( x + y + ) s match wndow n pxel gray-level at the pont n n search area ; T s the same as equaton (). After calculatng, the best match wndow has the maxmum B...3 Template change strategy Target states change constantly when target s movng, so usng fxed template doesn t perform stable trackng. Experment shows that how to update the template s very mportant. In ths paper, template change strategy based on normalze cross-correlaton functon s adopted, that s: after fne search, calculatng normalze cross-correlaton coeffcent between the current template and the best match wndow, formula s followng f f NCCF = (5) f f Where, f s template, f s the best match wndow. If NCCF T, current template s stll used at the next step; If NCCF< T, current template s replaced by the best match wndow to perform trackng at the next step. If NCCF< T ( T < T ), that means template has a great change n target movng, here, target s maybe occluded or affected by nose, then template doesn t brefly changed and the old template s stll kept. Experment shows that ths strategy s very effectve. 3 Experment results analyss and comparson A lot of mage sequences are smulated, two mage sequences are chosen to dsplay. Fgure s the st mage sequence. The mage background s fxed, there are 56 frames totally, mage s 360 40 56, search area s 50 50. In fgure, (a) s the start frame, (b), (c), (d) and (e) s the mddle frames, (f) s the last frame. The whte square n the frame s the trackng sgn. There are two lttle mages at the down-left (a) and (d), the left mage s template and the rght mage s the correspondng crcle pxels. Match template s updated n whole course of trackng. Correlaton-based method and SSDA can stably track too, but our method s the fastest one n the table shows the comparson of three methods computatonal cost for the st mage sequence. The smulaton s done wth matlab5.3 on Pentum III 733. Table. The comparson of three method computatonal cost NCCF SSDA CPM st sequence 39.4s 0.8s 6.3s nd sequence 56.s.6s 0.8s Fgure s the nd mage sequence. The mage background s movng, there are 68 frames totally, mage s 384 88 56, search area s 60 60. In fgure, (a) s the start frame, (b), (c), (d) and (e) s the mddle frames, (f) s the last frame. The whte square n the frame s the trackng sgn. There are two lttle mages at the down-left (a), (b), (d), (e) and (f), ther sgnfcaton s the same as fgure. Table shows the comparson of three methods computatonal cost for the nd mage sequence, too. It s same that our method s the fastest one n three methods. 4 Concluson In ths paper, a fast vsual trackng algorthm based on Crcle Pxels Matchng (CPM) s presented; ths algorthm fused the deas of correlaton-based trackng method, seral smlar detecton algorthm and featurebased trackng method. The Crcle pxels are adopted as feature pxels set; t has not hgh calculaton cost to extract the feature pxels. Based on usng the dea of seral smlar detecton algorth ths algorthm adopts coarse-to-fne strategy to search the correct target poston. Coarse stage s used to decde the preparatve matchng wndows and fne stage s used to decde the fnal correct wndow. Fnally, normalze cross-correlaton functon s used to decde the template change strategy. Smulatons showed that ths algorthm not only could track target stably, but also the computatonal cost s greatly decreased. Compared wth correlaton-based trackng method and seral smlar detecton algorth ths algorthm has superorty n calculaton cost. Reference: [] R.C.Gonzalez, P. Wntz, Dgtal Image Processng, Addson-Wesley Publshng Company, Inc, 977
a. st frame b. 6 th frame c. 5 th frame d. 30 th frame e. 4 nd frame f. 56 th frame Fgure.Target trackng under the fxed background [] Chrstan Hepke, Overvew of Image Matchng Technques, [EB/OL] http://dgrwww.epfl.ch/phot/workshop/wks96/art_3_.html, 996-04-9 [3] D.I. Barnea and H. F. Slverman, A Class of Algorthms for fast Image Regstraton, IEEE. Trans. Computers.C-,,, pp:79-86, Feb. 97 [4] J.K. Aggarwal and N.Nandhakumar, On the Computaton of Moton from Sequences of Images---A Revew, Proceedngs of the IEEE,Vol:76, No.8, PP:97-935, Aug.988 [5] D.Marr and B. Hldreth, Theory of edge detecton, Proc. Royal Socety of London, Seres B, 07:87-7,980 [6] Canny J, A computatonal approach to detecton, IEEE. Trans. on PAMI, Vol:8,No.6, pp:679-698, 986 [7] Quddus A, Fahmy M M, Fast wavelet-based corner detecton technque, Electroncs Letters, Vol:35,No.4, pp:87-88, 999
a. st frame b. 5 th frame c. 6 th frame d. 36 th frame e. 53 rd frame f. 68 th frame Fgure. Target trackng under the movng background [8] Laganere R, A morphologcal operator for corner detecton, Pattern Recognton, Vol:3,No., pp:643-65, 998 [9] S T Barnard and W B Thompson, Dsparty Analyss of Images, IEEE. Trans. on PAMI, Vol:,No.4, pp:333-340,980 [] H. Gharav and Mke Mlls, Blockmatchng Moton Estmaton Algorthms New Results, IEEE Trans. Crcuts and SysteVol:37,No.5, pp:649-65, May 990 [0] G. Borgefors, Dstance transformatons n dgtal mages, Comput. Vson, Graphcs, Image Processng, Vol.:34, pp:344-37,986