Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 VEHICLE TRACKING USING KALMAN FILTER AND FEATURES Amir Salarpour 1 ad Arezoo Salarpour 2 ad Mahmoud Fathi 2 ad MirHossei Dezfoulia 1 1 Departmet of Computer Egieerig, BuAliSia Uiversity, Hameda, Ira {a.salarpour, dezfoulia}@basu.ac.ir 2 Departmet of Computer Egieerig, Ira Uiversity of Sciece ad Techology,Tehra, Ira arezoo.salarpour@gmail.com,mahfathi@iust.ac.ir ABSTRACT Vehicle trackig has a wide variety of applicatios. The image resolutio of the video available from most traffic camera system is low. I may cases for trackig multi object, distiguishig them from aother is t easy because of their similarity. I this paper we describe a method, for trackig multiple objects, where the objects are vehicles. The umber of vehicles is ukow ad varies. We detect all movig objects, ad for trackig of vehicle we use the kalma filter ad color feature ad distace of it from oe frame to the ext. So the method ca distiguish ad trackig all vehicles idividually. The proposed algorithm ca be applied to multiple movig objects. KEYWORDS Kalma filter, occlusio, active cotour 1. INTRODUCTION There are a umber of traffic moitorig techologies beig used. Traffic cameras provide a more flexible way of moitorig traffic. These cameras ot oly ca be used i simple tasks like coutig cars, they also have the potetial to be used i more complex applicatios like trackig. Multiple object trackig is a importat research topic i computer visio. It has the ability of deal with the sigle object difficulties such as occlusio with backgroud chagig appearace, illumiatio, o rigid motio ad the multi object difficulties such as occlusio betwee objects ad object cofusio. I [1] trackig fix umber of objects. I [2] a efficiet algorithm to track multiple people is preseted. [3] proposed a bayesia tracker for trackig multiple blob. Various trackig algorithms have bee proposed i the literature, icludig approaches templates ad local features [4] Kalma filters [13][14] ad cotours [11][12]. The mea-shift algorithm was first adopted as a efficiet trackig techique i [15]. I trackig systems two problems must be cosidered: predictio ad correctio. Predict problem: predict the locatio of a object beig tracked i the ext frame, that is idetify a regio i which the probability of fidig object is high. Correctio problem: idetify the object i the ext frame withi desigated regio. A well-kow solutio for predictio is Kalma filter, a recursive estimator of state of a dyamic system. Kalma filter have bee adopted i video trackig [5]. To predict the search regio more effectively, mea-shift was combied with Kalma filter i [16]. To improve the ability of mea- DOI : 10.5121/sipij.2011.2201 1
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 shift trackig with respect to scale chages, a scale selectio mechaism was itroduced i [17] based o Lideberg s theory. Mea-shift has bee used i the past to track movig targets i sequeces of FLIR imagery [18] ad huma bodies (i.e., o-rigid objects) i [19]. The correctio problem requires a similarity metric to compare cadidate pairs of object i previous ad curret frame. This is the correspodece of object i two frames. Matchig metrics i correctio problem is importat. A trackig problem is data associatio, fidig the true positio of movig target, whe there are more tha oe valid cadidate. This occurs i clutter scees. The success or failure of ay trackig algorithm depeds a lot o the degree that the tracked object ca be distiguished from its surroudigs [10]. I particular, the set of features used by the trackig algorithm to represet the object(s) beig tracked plays a major role i trackig performace. Usig color iformatio aloe is ot sufficiet for o-road vehicle trackig. Competig clutters havig similar colors as the target may appear i the backgroud quite ofte. Moreover, the color of the target beig tracked varies due to light chages ad road coditios. Cosequetly, robust trackig performace ca be gaied by switchig to shape iformatio whe color iformatio becomes less reliable ad the opposite. The remider of this paper is as follows: sectio 2 is a cocise review of video trackig algorithms i computer visio. I sectio 3 we describe our approach. Ad i sectio 4 we preset the results of multiple vehicle trackig. Ad the sectio 5 devoted to the coclusio. 2. TRACKING METHODS Trackig methods ca be divided ito four major categories: regio based, model based, active cotour based ad feature based. Regio based algorithms track objects accordig to variatios of the regios correspodig to the movig objects [6,7]. These algorithms usually detect motio regio by subtractig the backgroud from the curret image. These algorithms caot work well whe there are multiple movig objects. The idea i regio- or blob-based trackig is to idetify coected regios of the image, blobs, associated with each vehicle. Regios are ofte obtaied through backgroud subtractio, for which may methods exist, ad the tracked over time usig iformatio provided by the etire regio [20][21]. Model based algorithms track objects by matchig object model, which produced later [8]. There are oe or several models of vehicles. They are most robust tha the feature based algorithms but slower. Active cotour trackig algorithms track objects by their cotours. They update these cotours i cosecutive frames [9]. These algorithms provide more efficiet descriptio of objects tha do regio-based algorithms, ad the computatioal complexity is reduced. However, the iability to segmet vehicles that are partially occluded remais. If a separate cotour could be iitialized for each vehicle, the trackig could be doe eve i the presece of partial occlusio. For all methods, iitializatio is oe of the major problems. Feature based algorithms track objects by extractig their features ad matchig these features betwee frames [8][22][23]. There are some features that defie a vehicle (symmetry, edges, shadow, color, size), ad they are looked for sequetially i the image. We use both regio based ad feature based trackig i this work. 2
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 3. OURMETHOD OBJECTDETECTION 3.1.Backgroud Estimatio The proposed method uses both regio based ad feature based trackig algorithms for trackig cars. For predictio step we use regio based ad predict the positio of object i frame at time t+1. We cosider the ceter of the object as a poit. The we use Kalma filter i frame at time t for predict the positio of this poit i frame at time t+1. the we use the distace ad color feature for correctio i frame t+1, we match the color of vehicle ad check its distace. Ad we fid if it predicts correctly or ot. If it has errors, this step corrects the errors. First we should detect vehicles, we use a adaptive backgroud model. I this sectio first we describe a adaptive backgroud geeratio ad movig objects detectio. The the trackig algorithm is described. Notice that i this article camera positio assumed statioary. At first, backgroud frame B0(x, is iitialized by the first frame of image sequece. B 0 = I0( x, For determied chages i frame mask M is defied by thresholdig the differece betwee three cosecutive frames. M + 1 0 = 1 f I I + 1 + 1 (x, (x, - I - I -1 otherwise (x, < 1or (x, < 1, Now adaptive backgroud will created by M. The backgroud update model for (+1) frames is defied as follow: B + 1 αb (x, + (1-α)I (x, if M (x, = 0 (x, = B (x, otherwise Where α 0, 1 is a time costat that cotrols the rate of the adaptatio of the backgroud. I the other word percetage of chaged pixels i the curret frame is defied whit respect to the previous two frames. To defie the best value for α we suggest followig equatio: α = M areaof I 3
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 3.2.Object Detectio The most used approach to detect objects i a video sequece is backgroud subtractio. There are situatios for which a poor implemetatio of the scheme causes a erroeous/coarse segmetatio, so that cosequet processes of trackig ad recogitio ofte fail. A automatic approach preserves from such icoveiece. We assume B, I the gray-valued frame ad the correspodig adaptive backgroud model. A biary mask D is performed to segmet out objects of iterest (foregroud detectio) 0 D = 1 if S Th otherwise Where S ad the compute whit followig relatios: S (x, = I (x, - B (x, MED = media[s (x, ] (x, I, MAD = media[s (x, - MED] (x, I We will have a adaptive method accordig the above relatios defied. 4. OBJECT TRACKING We use both regio based ad feature based algorithms for trackig. First for regio based we use the Kalma filter for fid the regio of vehicle i the ext frame. We fid the ceter of object, the use Kalma filter for predict the positio of it i the ext frame. 4.1.Kalma Filter A Kalma filter is used to estimate the state of a liear system where the state is assumed to be distributed by a Gaussia. Kalma filterig is composed of two steps, predictio ad correctio. The predictio step uses the state model to predict the ew state of the variables: Where ad are the state ad the covariace predictios at time t. D is the state trasitio matrix which defies the relatio betwee the state variables at time t ad t 1. Q is the covariace of the oise W. Similarly, the correctio step uses the curret observatios to update the object s state: t X = X t + K t t t [ Z MX ] 4
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 M is the measuremet matrix, K is the Kalma gai. Note that the updated state, is still distributed by a Gaussia. Kalma filter, the exteded Kalma filter assumes that the state is distributed by a Gaussia. 4.2.Correctio: Color ad size features After usig the displacemet of vehicle, ad predictig the positio of vehicle i the ext frame, the ext step is to correct the results of predictio step. For the correctio step we use the feature based method. Now we isert two coditios o color ad size features for correspodig poit. The first coditio is the compariso of blobs color i two cosecutive frames. The color of blob i frame compared with the color of blobs i +1 frame, ad it must be the same. The secod coditio is o the size of blobs i two frames. Sice that the distace betwee vehicle ad camera is varyig, the size of vehicle is varyig too. But from oe frame to the ext the variatio ratio i size is low, ad the differece betwee sizes of two blobs i cosecutive frame must be low. So if the colors of two blobs be matched ad the size differece betwee them be lower tha a threshold, ad the predicted choice satisfies these two coditios, we cosider that the predictio is true ad set the predicted positio to ceter of blob i ew frame. I this coditio if two vehicles are close to each other, with deal with these coditios the correct choice is selected for each vehicle. Also if the occlusio is occurred, after that with match the coditio each vehicle ca be tracked correctly. 5. RESULTS The proposed tracker has bee tested uder some trackig videos. Two evaluate the performace of our method we use the accuracy measure. The average accuracy of proposed method is 96%. 5.1.Trackig Performace Evaluatio Poit trackig methods ca be evaluated o the basis of whether they geerate correct poit. Give a groud truth, the performace ca be evaluated by computig accuracy measure. I the cotext of poit trackig, the accuracy ca be defied as: Accuracy = correct correspodece is the umber of poits which are detected ad tracked correctly by the proposed method. Ad the correspodece term is the total umber of correspodece poits. 5.2.Experimetal Results I this sectio we preset our method o real image sequece. The algorithm acts correctly i clutter scee that is preseted i figures. Multiple vehicles ca be tracked simultaeously.it ca cotrol some problem of multi object trackig, such as appearace ad disappearace of objects, ad missig of a vehicle. 5
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 Figure 1. Multi car trackig 6. CONCLUSIONS I this paper we preseted a trackig method for processigvideo data i order to perform trackig by a machie visio system. The objective of the preseted approach is to miimize the computatio time, ad use the feature of vehicles for the best trackig. The outcome of our approach is the acquisitio of route related data such as travel times ad tracig of traffic streams, which ca highly icrease the efficiecy of traffic cotrol systems. Figure 2. Multi car trackig i clutter scee 6
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 I this article we preseted a combiatioal method for trackig multiple vehicles. This method is combied of two categories of algorithms. Regio based ad feature based. First we use displacemet of vehicle for predict the positio of it i the ext frame, the we use two features of vehicle,color ad size to make correspodece. The proposed algorithm ca deal with the trackig problem such as appearace, disappearace ad occlusio. It ca work i clutter scee ad the results are satisfactory. REFERENCES [1] J.P. MacCormick ad A. Blake, (1999) A probabilistic exclusio priciple for trackig multiple objects, i ICCV99, 572-578. [2] H. Tao, H.S. Sawhey ad R. Kumar, (1999) A samplig algorithm for trackig multiple objects, i Visio Algorithms. [3] C. Hue, J.P. Le Cadre ad P.Perez, (2002) Trackig multiple objects with particle filterig, IEEE Trasactios o Aerospace ad Electroic Systems, 791-812. [4] Y. Raja, S. J. McKea ad S. Gog, (1998) Segmetatio ad trackig usig color mixture model, Asia Coferece o Computer Visio. [5] G. S. Maku, P. Jai, A. Aggarwal ad L. Kumar, (1997) Object trackig usig affie structure for poit correspodece, IEEE coferece of Computer Visio ad Patter Recogitio, 704-709. [6] P. Kumar, H. Weimi, I. U. Gu ad Q. Tia, (2004) Statistical modelig of complex backgrouds for foregroudobject detectio, IEEE Trasactio o Image Processig, 43-53. [7] Boyoo Jug ad Gaurav S. Sukhatme, (2004) A Geeralized Regio-based Approach for Multitarget Trackig i Outdoor Eviromets, IEEE Iteratioal Coferece o Robotics ad Automatio, 2189-2195. [8] D. Serby, E. K. Meier ad L. V. Gool, (2004) "Probabilistic Object Trackig Usig Multiple Features", IEEEPatter Recogitio Itelliget Trasportatio Systems, 43-53. [9] Zhimi Fa, Jie Zhou, Dasha Gao ad Zhiheg Li, (2002) Cotour Extractio Ad Trackig Of Movig Vehicles For Traffic Moitorig, IEEE Iteratioal Coferece o Itelliget Trasportatio Systems, 84-87. [10] Robert T. Collis ad Yaxi Liu, (2003) O-lie selectio of discrimiative trackig features, IEEE Iteratioal Coferece o Computer Visio, vol. Nice, Frace, pp. 346 352. [11] Esther B. Meier ad Frak Ade, (1999) Usig the codesatio algorithm to implemet trackig for mobile robots, Third Europea Workshop o Advaced Mobile Robots, pp. 73 80, Zurich, Awitzerlad. [12] Adrea Giachetti, Applicatios of cotour trackig techiques, citeseer.ist.psu.edu/7949.html. [13] J Lou, H Yag,Wei Mig Hu, Tieiu Ta, (2002) Visual vehicle trackig usig a improved ekf, Asia Coferece o Computer Visio. [14] D. Koller, J. Weber, ad J. Malik, (1994) Robust Multiple Car Trackig with Occlusio Reasoig.Third Europea Coferece o Computer Visio, pp. 186 196, Spriger-Verlag. 7
Sigal & Image Processig : A Iteratioal Joural (SIPIJ) Vol.2, No.2, Jue 2011 [15] D. Comaiciu, V. Ramesh ad P. Meer, (2002) Real-time trackig of o-rigid objects usig mea shift, IEEE Cof. o Computer Visio ad Patter Recogitio, vol. 2, pp. 142 149, Hilto Head Islad, South Carolia. [16] D. Comaiciu ad V. Ramesh, (2000) Mea shift ad optimal predicatio for efficiet object trackig, IEEE It. Cof. Image Processig, vol. 3, pp. 70 73, Vacouver,Caada. [17] Robert T. Collis, (2003) Mea-shift blob trackig through scale space, IEEE Computer Visio ad Patter Recogitio, vol. Madiso, WI, pp. 234 240. [18] AlperYilmaz, KhurramShafique, NielsLovo, Xi Li, Teresa Olso, Mubarak A. Shah, (2001) Target trackig i flir imagery usig mea-shift ad global motio compesatio, proceedigs of IEEE Workship o Computer Visio Beyod Visible Spectrum, Hawaii. [19] FatihPorikli ad OcelTuzel, (2003) Huma body trackig by adaptive backgroud models ad mea-shift aalysis, IEEE Iteratioal Workshop o Performace Evaluatio of Trackig ad Surveillace. [20] D. Magee, (2004) Trackig multiple vehicles usig foregroud, backgroud ad motio models. Image ad Visio Computig, 22:143 155. [21] B. Mauri, O. Masoud, ad N. P. Papaikolopoulos, (2005) Trackig all traffic: computer visio algorithms for moitorig vehicles, idividuals, ad crowds, Robotics & Automatio Magazie, IEEE, 12(1):29 36. [22] S. T. Birchfield, (1999) Depth ad Motio Discotiuities,PhD thesis, Staford Uiversity. [23] N. K. Kahere, S. J. Pudlik, ad S. T. Birchfield, (2005) Vehicle segmetatio ad trackig from a low-agle off-axis camera, I IEEE Coferece o Computer Visio ad Patter Recogitio, Sa Diego, Califoria. 8