



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
AbstractThebackgroundidentificationmethodsareusedinmanyfieldslikevideosurveillanceandtrafficmonitoring.InthispaperweproposeahardwareimplementationoftheGaussianMixtureModelalgorithmabletoperformbackgroundidentificationonHDimages.TheproposedcircuitisbasedontheOpenCVimplementation,particularlysuitedtoimprovetheinitialbackgroundlearningphase.Bit-widthhasbeenoptimizedinordertoreducehardwarecomplexityandincreaseworkingspeed.Theproposedcircuitprocesses221920X1080framespersecondwhenimplementedonVirtex5FPGA.IndexTermsBackgroundidentification,FieldProgrammableGateArray,Objectdetection,OpenCV.I.INTRODUCTIONSurveillanceandtrafficmonitoringapplications1-4relyontheidentificationofrelevanteventsinvideosequences.Objectdetectiontechniqueshavebeenstudiedduringtheyearsanddifferentalgorithmshavebeenproposed.Mainrealtimeidentificationalgorithmsarebasedontheframedifference5-7oronthecomparisonwithareferencemodel(backgroundsubtractionmethods)8-13.Theframedifferencemethods5-7,detectthemovingobjectscomparingconsecutiveframes.Thealgorithmsarefastandsimpletoimplementbuttheoutputdependsonthespeedofthemovingobjects.Thebackgroundsubtractionalgorithmsdetecttheforegroundcomparingtheframewithareferencemodel.Ref.8considersapixelasbackgroundifitkeepsaconstantvalueforarelativelylongtime.Thetechniquefailswhenachangeoftheilluminationariseonanotherwiseconstantscene.Papers9,10useaKalmannfilter,while11proposesaWienerfilter,toadaptthebackgroundmodel.Othermethodsusestatisticalalgorithmstoobtainastatisticalmodelforeachpixelofthebackground,12,13.Foranewframe,thepixelsarecomparedwiththestatisticalmodel.Ifthedifferenceisgreaterthanathreshold,thepixelisclassifiedasforeground.In12analgorithmthatusesasingleGaussiandistributionperpixel,isproposed.Thealgorithmisefficientbutisnotabletodescribeamultimodalbackgroundinwhichshadowsandobjectsshowingrepetitivemotion(e.g.ripplingwavesorwhishingleaves)arepresent.Forthisreason,in13,eachpixelismodeledwithamixtureofGaussiandistributions.Thetechniqueof13isknownasGaussianMixtureModel(GMM)andprovidesgoodperformancesinbothpresenceofilluminationchangesandmultimodalbackground.DuetothegoodperformancestheGMMalgorithmhasbeenselectedasthebackgrounddetectionalgorithmintheOpenCVlibrary15.OpenCV(OpenSourceComputerVision)isaOpenSourcesoftwarelibrarydevelopedbyIntel.OpenCVprovidesacommonbaseofcomputervisioninstrumentsabletoextractrelevantdetailsfromtheimagesandtoprocesstheminautomaticway.TheGMMalgorithmproposedintheOpenCVlibraryisanoptimizedversionofthealgorithmof13thatisparticularlysuitedtoimprovetheinitiallearningphase.MaindrawbackoftheGMMalgorithmistheneedofnumerousnonlinearcomputationsthatlinearlyincreasewiththenumberofGaussiansperpixelandmakerealtimevideoprocessingnotpossiblewithasoftwareimplementation.In13,aframerateof11fpsisobtainedforasmallframesizeof160x120onanSGI02withaRIOOOOprocessor.In14anFPGAimplementationoftheGMMalgorithmisproposed.ThealgorithmdoesnotcomplywiththeOpenCVGMMalgorithmbutimprovestheprocessingcapabilitiesandprocessesrelativelylargeimages(1024x1024at38fps).InthispaperahardwareimplementationoftheGMMalgorithmthatallowsrealtimeprocessingofhighdefinitionvideosandcomplieswiththeOpenCV,isproposed.OurcircuitprocessesHDimagesat22fpswhenimplementedonVirtex5FPGA.Programmablelogicoccupationis5.5%ofthexc5vlx50FPGAwhilepowerdissipationis27.6mW47MHz.II.GAUSSIANMIXTUREMODELTheGMMalgorithmhasbeenproposedbyStaufferandGrimson13withtheaimofefficientlymodelamultimodalbackground.ItdescribesthestatisticofeachpixelusingastatisticalmodelcomposedbyamixtureofKGaussiandistributions.UsingmorethanoneGaussianallowstomodelrealsituations.AsanexampleapointontheframewhoseintensityoscillatesbetweentwovaluesisperfectlymodeledwithtwoGaussians.GreateristhenumberoftheGaussiandistributionsemployedbythealgorithm,higheristheprecisionofthemethodandthecomputationalcomplexity.AdescriptionoftheGMMalgorithmfollows.ForthedetailsOpenCVcompatiblerealtimeprocessorforbackgroundforegroundidentificationM.Genovese,E.Napoli,N.PetraDIBETUniversityofNapoli,ViaClaudio,21-80125Napoli-ItalyEmail:ma.genovesestudenti.unina.it22ndInternationalConferenceonMicroelectronics(ICM2010)978-1-4244-5816-5/09/$26.002009IEEEreferto13andtotheOpenCVdocumentation.A.ParametersUpdateWhenaframeisacquired,amatchconditionwiththeKGaussiansisverifiedforeachpixel.ApixelmatcheswithaGaussianifthedifferencebetweenthemeanofthedistributionandthepixelislowerthan2.5standarddeviations.Thematchconditionisimportanttoestablishifthepixelvaluecanbeconsideredasbackground.Whenthek-thGaussianverifiesthiscondition(matches),itsparametersareupdatedasfollows:,1,2222,1,1,1,1ktktktktktktktktktGtktGtkktktpixelpixelMmatchsummatchsum(1)where,andaremean,varianceandweightforeachGaussian.,GtandaretwodifferentlearningratesandmatchsumisacounterintroducedintheOpenCValgorithmthatwillbedescribedinthefollowing.FortheunmatchedGaussianstheweightsareupdatedaccordingto:,1,ktktkt(2)whilemeanandvarianceareunchanged.EachpixelcanonlymatchasingleGaussian.IfthepixelfallsundermorethanoneGaussianapriorityparameter,namedFitness,selectsthematchedGaussian.TheFitness(F)parameterisgivenby:kkkF(3)WhenaGaussianhasanhighFvalueitrepresentsabackgroundpixelwithhighprobability.TheKGaussiansaresortedindecreasingorderoftheFvalue(thatis,F1F2F3).TheGaussianthatmatcheswiththepixelandhasthehighestFisconsideredasthematcheddistribution.Aspecific“nomatch”updatingprocedureisexecutedwhenthepixeldoesnotmatchanyGaussian.InthiscasetheparametersoftheGaussianwithsmallestFareupdatedas:2,1,1,1_11ktktkktkkpixelvarianceinitmatchsummatchsum(4)wherevariance_initisafixedinitializationvalue.TheweightsoftheotherGaussiansaredecrementedasin(2)whiletheirmeansandvariancesareunchanged.B.BackgroundidentificationThebackgroundidentificationisperformedusingthefollowingalgorithm,whereTisaprefixedthreshold:,1argminbbktkBT(5).Eq.(5)worksaddinginsuccessiontheweightsofthefirstbFsortedGaussians,untiltheirsumisgreaterthanT.TheGaussiansthatverify(5)representthebackground.IfapixelmatcheswithoneoftheseGaussians,itisconsideredasbackgroundpixel,otherwiseitisclassifiedasforeground.III.HARDWAREIMPLEMENTATIONTheGMMcomputationalcomplexityisveryhighandgrowswiththenumberofGaussiansusedforeachpixel.Alsotheaccuracyofthebackgroundidentificationincreaseswiththisnumber.Ithasbeenobservedthatagoodcompromiseisamodelwith3Gaussians.Theproposedcircuitimplementsthesinglechannel,luminancebased,OpenCVimplementationoftheGMMalgorithm.ThecomputationalcomplexityofthealgorithmhasagrowthrateofO(n)wherenistheframesize.ThetargetofthisworkistoprocessHDvideoatmorethan10fps.Itisthenrequiredtoprocess21Mpps.Asoftwareimplementationdoesnotreachtheseperformances.TheproposedHWimplementationoftheGMMhasbeendescribedinVHDLcode.ThetargetdevicesfortheimplementationhavebeenhighperformanceVirtexFPGA.OurGMMprocessorcomplieswiththeOpenCValgorithmallowingasimplereplacementofaslowersoftwareimplementationinarealtimeimageprocessingsystem.A.CircuitTheproposedcircuitisshowninFig.1.Inputdataarethe8bitluminanceoftheinputpixel(Pixel),andthestatisticalmodelofthepixel(Parameters).Theoutputis,fortheinputpixeltheupdatedstatisticalmodel(UpdatedParameters)andthebackground/foregroundtag.AdetailedexplanationofthealgorithmimplementedbyeachcircuitalblockofFig.1isgiveninthefollowing.Fitness:computestheFitnessfactor(3)forthethreeGaussians;Match:verifiesthematchFig.1.BlockdiagramofthebackgroundidentificationcircuitconditionforthethreeGaussians;Controllogic:sortstheGaussiansindecreasingFitnessorderandestablisheswhichGaussianisupdatedasin(1),(2),(4).GaussiansortingisperformedthroughatwobytwocomparisonoftheFfactors.Onlythreecomparatorsandfewlogicgatesareneeded.ParameterUpdate:ifthematchconditionisverified,Weights,MeanandVarianceblocksupdatetheparametersasdescribedin(1),(2).IfnoGaussianmatchesthepixel,No-Matchblockupdatesmean,varianceandweightofthesmallestFGaussianusing(4).OutputSelection:Dependingonwhetherthematchconditionisverifiedornot,thelogicofoutputselectionestablishesthevaluesoftheupdatedparameters.Backgroundidentification:verifiesthebackgroundidentificationconditionshownin(4)andgeneratesthebg/fgmaskforeachframe.TheOpenCValgorithmuses,foreachGaussian,acounternamedmatchsumthatisincrementedwhentherelateddistributionmatcheswithapixelandisusedtoupdatetheweightwhennomatchisverified.In13,thematchsumisnotusedand,whennomatchisverified,theweightisinitializedtoafixed(verysmall)value.OpenCVGMMmethodisfasterwhentheinitialidentificationofthebackgroundisconducted.ItdetectsthebackgroundafteroneframewhiletheGMMalgorithmof13requiresabout35framesasshowninFig2.Theintroductionofthematchsumk,tentailsthesynthesisofthreecountersthatarenotonthecriticalpath.Theonlydrawbackisanincreaseofcircuitarea.B.BandwidthThecrucialpointoftheGMMisthememorysizerequiredtorecordthebackgroundparameters.Foreachpixelmean,variance,weightandmatchsumofeachdistributionmustbeloaded/stored.Dependingontheirwordlengths,memorybandwidthbottleneckscanincur.InthesoftwareOpenCVimplementationtheparametersaredoubleprecision(64bits)floatingpointnumbers.Theparameterbitsforeachpixelaretherefore758.If,asexample,thememorythroughputis128bitpercycle,6clockcyclesareneededinordertoloadtheparameterbitsforeachpixel.Theconsequence,alsoduetothehardwarecomplexity,isthatrealtimevideoprocessingisnotpossibleusingfloatingpointarithmetic.AdetailedexaminationoftheGMMalgorithmrevealsthatmostsignalshavealimiteddynamics.Mean,weightandvariancerangein0,255,0,127,and0,1,respectively.InthiscaseusingafixedpointrepresentationprovidesgoodperformanceswhilereducingHWcomplexityandtherequiredbandwidthtowardsthememory.Thenumberofbitofthefixedpointrepresentationoftheparametersisbasedonboththeirrangeandtherequiredaccuracy.IfthemeanoftheGaussiansisa23bitnumber(7bitarefortheintegerpart,18forthefractionalpart)bothmemorybandwidthandlogicutilizationareveryhigh.Inordertoimprovetheperformancesthewordlengthshavebeenreducedobtaininggoodprecisionwiththeleastpossiblenumberofbits.Itisworthnotingthatthenumberofbitsofthefractionalpartoftheparametersarealsoafunctionofthelearningrate(G,t,).Smallerlearningratesincreasethebitsneededforthefractionalpart.Asexampleif=0.02,atleast6bitsareneededforthefractionalpartof.Usinglowerwordlengths,causesanunderflowthatresultsin=0andimpairstheGMMalgorithm.TherepresentationsusedinourimplementationareshowninTableI,givenwithUm,nnotation.Um,nindicatesanunsignedfixedpointnumberwhere2mistheweightofthemsband2-nistheweightofthelsb.Withregardtothematchsum,ithasbeenobservedthat4bitspermatchsumallowgoodperformanceswithreducedlogicutilization.Withtheproposedrepresentations116bitsareemployedforeachpixel,greatlyreducingtherequiredmemorybandwidthforrealtimeimageprocessing.Toprocess10fpswithframesizeof1920X1080thememorybandwidthis287MB/s.Moreover,theimagesinFig.3showthatthedoubleprecisionfloatingpointimplementation(Fig.3a)isverysimilartotheproposedimplementation(Fig.3b).C.NonlinearfunctionsDifferentnonlinearfunctionsarerequiredfortheimplementationoftheGMM.Asexample,thefitnessfactor,theweightin(4),andthelearningrateGrequirethebinaryinversionoperation.Theactualchoice,inordertominimizecircuitcomplexityandmaximizecircuitspeed,hasbeentheuseofROMimplementationofthenonlinearfunctions.TheROMimplementationisonlyfeasibleifthenumberofinputbits(andhenceofthedifferentROMentries)islimited,sinceFig.2.Numberofframesrequiredforbackgroundidentification.Solidline:proposed,OpenCVcompliantimplementation;dashedline:GMMalgorithmof13TableIRepresentationsusedinourimplementationParameterRepresentationBit#=0.02U-6,94k,tU7,412k,tU13,-212k,tU-1,88Fig.3.Background/Foregroundframes.(a)ObtainedwithdoubleprecisionfloatingpointGMM(b)Proposedoptimizedimplementation.LUToccupationexponentiallyincreaseswiththenumberofinputbits.MainadvantageoftheproposedHWimplementationisthattheinputdatahaveanoptimizedfixedpointrepresentationthatreducesthenumberofinputbitswhileprovidingareliableandefficientcircuit.Asexample,thecalculationoftheFitnessfactor,hasbeenimplementedwithaROMandamultiplier.TheROMstorestheinverseofthestandarddeviation.Ifthevarianceandtheinverseofthestandarddeviationarerepresentedon12and8bits,respectively,thesizeoftheROMfortheFitnesscomputationis212X8bits.ThelogicutilizationforVirtex5xc5vlx50is243Slicesoutof28800.Workingfrequencyandpowerare191.6MHzand1.87mW,respectively.D.ReconfigurabilityAspreviouslynoted,thenumberofbitsoftheGaussiansparametersmustbechosenaccordingtothevaluethatisafunctionoftheconsideredbackground(slowbackgroundchangingscenesrequirelowervalues).Theproposeddesignishighlyparameterizedandallowsastraightforwardmodificationoftherepresentationoftheparameters.Thisallowsafastadaptionofthecircuittonewapplicationsandisofutmostimportanceforcommercialapplicationssinceprovidesoptimaldesignswiththelowestpossiblenumberofbits.E.ResultsandPerformacesTheproposed,notpipelined,implementationoftheOpenCValgorithmhasbeensynthesizedandimplementedonvariousXilinxFPGA.TheonlysequentialelementsaretheFFsthatsynchronizeinputandoutputdata.Thecircuithasbeentestedusingartificialvideo,computeranimatedvideoswithsimplebackgroundandusingvideosequencestakenfromrealsurveillancecameras.Thecircuitperformsoptimallyandrunssmoothlywithoutshowingreliabilityproblems.TableIIshowstheperformancesofdifferentcircuitimplementationsvaryingthevalueandthenumberofbitsoftherepresentations.Asshown,alltheproposedimplementationssatisfythe10fpsrequirement.Fordecreasingvaluesthehardwarecomplexityincreaseswhilespeeddecreases.Howeverforlowerthan0.002hardwarecomplexity,aswellasthespeedofthecircuit,donotincreaseinasensibleway.TheuseofacheaperVirtex-4FPGAreducesthespeedofthecircuitbyanamountequalto27%.AsaconsequenceitmightbeusefultoexploitpipeliningtoincreaseperformanceinordertouseevencheaperFPGAs.IV.CONCLUSIONSThispaperpresentsanhardwareimplementationoftheGMMalgorithmusedintheOpenCV.TheproposedcircuitimplementedonVirtex5(xc5vlx50Speedgrade-3)allowsamaximumworkingfrequencyof47MHzandishenceabletoprocess22fpsforanHDvideowithframesize1920X1080.Thecircuithasreducelogicutilizationof1572slicelut(5.5%oftheavailableLUT).Thedynamicpowerdissipationis27.6mW.HavingimplementedtheOpenCValgorithmthecircuitallowsaveryfastinitializationofthebackground.ThealgorithmhasbeenimplementedusingafixedpointarithmeticinsteadofthedoubleprecisionfloatingpointrepresentationusedintheOpenCVlibrary.Inthispaperitisshownthattheprecisionoftheresultingsystemisunchanged.REFERENCES1D.Gutchess,M.Trajkovi,E.Cohen-Solal,D.LyonsandA.K.Jain,Abackgroundmodelinitializationalgorithmforvideosurveillance”,inProc.EighthIEEEInternationalConferenceonComputerVision,vol.1,Vancouver,BC,July2001,pp.733-740.2I.Haritaoglu,D.HarwoodandL.S.Davis,“Afastbackgroundscenemodelingandmaintenanceforoutdoorsurveillance”,inProc.ofthe15thInternationalConferenceonPatternRecognition,vol.4,Barcellona,Spain,2000,pp.179-183.3B.Gloyer,H.K.Aghajan,K.Y.Siu,andT.Kailath,“Video-basedfreewaymonitoringsystemusingrecursivevehicletracking,”inProc.SPIESymp.ElectronicImaging:ImageandVideoProcessing,1995,pp.173-180.4L.Vibhaetal,MovingVehicleIdentificationusingBackgroundRegistrationTechnique”,Proc.oftheIntern.MultiConferenceofEngineersandComputerScientists,vol.1,HongKong,2008,pp.572-577.5Z.Chaohui,D.Xiaohui,X.Shuoyu,S.ZhengandL.Min,“AnImprovedMovingObjectDetectionAlgorithmBasedonFrameDifferenceandEdgeDetection”,inProc.Fo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 台阶坡道改建方案范本
- 审计部门年度工作总结
- 情志护理与养生
- 单招综评政策解读
- 教官培训工作述职报告
- 2026届福建省龙岩市北城中学英语九年级第一学期期末调研试题含解析
- 早教教师述职报告
- 新人销售技巧培训
- 2026届四川省成都西蜀实验英语九上期末学业质量监测试题含解析
- 江苏省徐州市市区部分2026届化学九年级第一学期期中学业水平测试试题含解析
- 2024年国家税务总局税务干部学院招聘事业单位工作人员考试真题
- 汽车喷漆彩绘培训课件
- 床上洗头护理培训课件
- 2025年统编版小升初语文阅读专项训练:点面结合(含答案)
- 羽毛球裁判员培训与实施
- 小学生养成良好学习习惯课件
- 宫外孕大出血护理
- 《乡土中国》非连续性文本阅读专练-2023届高考语文备考专题复习
- 2025年北京市水务局所属事业单位招聘工作人员101人笔试高频重点提升(共500题)附带答案详解
- 2025至2030年中国密炼机上辅机系统行业投资前景及策略咨询研究报告
- 《T CPSS 1013-2021-开关电源电子元器件降额技术规范》
评论
0/150
提交评论