:2007-07-12;:2007-09-24:(60372085):(1980-),,,,,(nihaopanpan@126.com);(1960-),,,,,.*1,2(1.,528402;2.,710072):,,;,,,87.76%94.19%:;;;:TP242.62:A:1001-3695(2008)07-1988-04TrajectoryrecognitionofmovingobjectsbasedonhiddenMarkovmodelPANQi-ming1,CHENGYong-mei2(1.Dept.ofAutomation,ZhongshanInstitute,UniversityofElectronicScience&TechnologyofChina,ZhongshanGuangdong528402,China;2.CollegeofAutomation,NorthwesternPolytechnicalUniversity,Xian710072,China)Abstract:UsingmodifiedhiddenMarkovmodel,firstly,aimingatthecomplexdegreeoftheobjectstrajectoriesinrealscene,themodelswerebuiltforeverytrajectorypattern,andthetrainingsampleswereusedtogetthecredibleparametersofthemodel.Finally,themaximumlikelihoodprobabilityoftestsampleswerecomputedtoallofthetrainedmodel,themaximumvaluewassavedandthecorrespondingmodelwastherecognitionresult.Thentrainandrecognizethesamplesclustered,andaveragerecognitionratereach87.76%and94.19%respectively.Keywords:trajectoryrecognition;movementanalysis;activitypattern;hiddenMarkovmodel(HMM),[1],,,[2],;,[3],[4],[3];[5]HMM,CDHMM,11.1[6,7],HMM,,HMMHMM,T,HMM,K{S1,S2,,Sk}HMM:a)=[1,2,,k],Ot=1,i=P(q1=Si)(i=1,2,,k),ki=1i=1;b)B={bi,j|i,j=1,2,,k},bi,j=P(qt=Sj|qt-1=Si,qt-2=Sk,)=P(qt=Sj|qt-1=Si),ki=1bi,j=1;c)N(Ot;j;j):jjj;qtQtt1.2HMMHMM:a),OP(O|)b)Q=q1,q2,,qT,OHMMc),P(O|),25720087ApplicationResearchofComputersVol.25No.7Jul.2008HMMHMM,,HMM(,,,1)HMM,HMM,,,,2HMM2.1HMM,HMM46,1,,,N=S,=[1.0,0,0,0,0]T51(1)A=[aij]NN,A,A010.5,,aij=0.50.50.50.50.50.50.50.51.055(2),HMM,,[8],HMM[9],HMMHMM,M,,M,,,M,,,,M,,,,M=2,O,bjO=Mm=1CjmN(O,jm,jm);j=1,,N(3):M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;HMM,(),184,242,12;Baum-Welch,HMM410-4HMMHMMNMOACjmjmjmvote,,,34HMM:=/100%,HMM,,HMM,,099125第n次迭代袁l=1第l个观察值序列及模型姿前向尧后向算法计算琢t(l)(i)和茁t(l)渊i冤,1臆t臆T,1臆i臆N计算孜t(l)(i,j)和酌t(l)渊i冤l=L?否l=l+1利用多观察值序列重估公式重估模型参数姿=渊仔i袁aij袁Cjm袁jm袁jm冤模型评价袁计算机P渊O|姿冤和驻P/P是否收敛钥是下一次迭代n=n+1结束轨迹模式类Ci的训练袁得到模型图2多观察值序列训练算法流程图是否轨迹数据预处理T轨迹测试样本序列似然度计算似然度计算姿2姿1轨迹1HMMP渊O|姿1冤轨迹2HMMP渊O|姿2冤最大值选择模型索引=argmaxP(O|姿i)1臆i臆n姿n似然度计算轨迹nHMMP渊O|姿n冤图3HMM轨迹识别流程O图4场景1图5场景2轨迹预处理视频采集运动目标轨迹跟踪轨迹样本库识别尧分类结果HMM识别尧分类HMM训练训练模块识别模块HMM模型库轨迹训练样本个数测试样本个数8221041510925表1场景1中样本分配轨迹训练样本个数测试样本个数10921063表2场景2中样本分配4,,,,,,CDHMM,:[1]OHNSONN,HOGGDC.Learningthedistributionofobjecttrajecto-riesforeventrecognition[J].ImageandVisionComputing,1996,14(8):609-615.[2]HUWei-ming,XIEDan,TANTie-niu.Ahierarchicalself-organizingapproachforlearningthepatternsofmotiontrajectories[J].IEEETransonNeuralNetworks,2004,15(1):135-144.[3]PORIKLIF,HAGAT.Eventdetectionbyeigenvectordecompositionusingobjectandframefeatures[C]//Procof2004ConferenceonComputerVisionandPatternRecognitionWorkshops(CVPRW04).WashingtonDC:IEEEComputerSociety,2004.[4]FORESTIGL,ROLIF.Learningandclassificationofsuspiciouseventsforadvancedvisual-basedsurveillance[M]//FORESTIGL,MHNENP,REGAZZONICS.Multimediavideo-basedsurveillancesystem:requirements.Boston:KluwerAcademicPublishers,2000.[5]LOUJian-guang,LIUQi-feng,TANTie-niu,etal.Semanticinterpreta-tionofobjectactivitiesinasurveillancesystem[C]//Procofthe16thInternationalConferenceonPatternRecognition,ICPR2002.Washing-tonDC:IEEEComputerSociety,2002.[6]PORITZAB.HiddenMarkovmodels:aguidedtour[C]//ProcofIEEEInternationalConferenceonAcoustics,SpeechandSignalPro-cessing.NewYork:IEEEPress,1988:7-13.[7]RABINERLR.AtutorialonhiddenMarkovmodelsandselectedap-plicationsinspeechrecognition[J].ProcofIEEE,1989,77(2):257-286.[8]BASHIRF,KHOKHARA,SCHONFELDD.Automaticobjecttrajec-tory-basedmotionrecognitionusingGaussianmixturemodels[C]//ProcofIEEEInternationalConferenceonMultimedia&Expt(ICME2005).Amsterdam:[s.n.],2005:1532-1535.[9],,.HMM[J].,1995,20(5):321-329.[10].[D].,2003.[11]LEEKK,XUYang-sheng.Boundarymodelinginhumanwalkingtrajectoryanalysisforsurveillance[C]//ProcofIEEEInternationalConferenceonRobotics&Automation.Piscataway,NewJersey:IEEEPress,2004:5201-5205.[12]TAOY,LISZ,PANQuan,etal.Real-timemultipleobjecttrackingwithocclusionhandlingindynamicscenes[C]//ProcofIEEECom-puterVisionandPatternRecognition