全文预览已结束
付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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苏教版六年级数学上册第四单元第6课时《按比分配的实际问题》教案
- 让“原则”从纸上走进题里-高中生物“实验设计原则”强化复习教案(对照、重复、随机等)
- 浅谈班级管理
- 护理记录的规范书写技巧
- 护理专业英语基础
- 护理与猴子之间的默契配合
- 护理执行力中的跨文化沟通
- 护理专业护理实践中的职业素养
- AQ 1044-2007 矿井密闭防灭火技术规范(正式版)
- 玩转高中数学研讨 08 立体几何与空间向量学霸必刷100题(原卷版)
- 及时雨高考英语词汇默写本上册答案1-10
- 中考英语1600词(词频顺序自测版)
- JTG-T 3331-04-2023 多年冻土地区公路设计与施工技术规范
- 跟骨骨折个案护理
- 日照站改造工程既有投光灯塔拆除专项方案(修改版2)
- 大数据 AI大模型-智慧统计大数据平台解决方案(2023版)
- 上海海湾别墅市场分析
- TSG 07-2019 特种设备生产和充装单位许可规则 含2021年第号修改单和2024年第2号修改单
- 医疗器械临床试验数据管理
评论
0/150
提交评论