资源描述:
《Seeing With openCV.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、SeeingWithOpenCVFollowThatFace!describedinlastmonth'sarticle.TodorithminmoredetailLastmonth'sarticleinthisthat,however,you'dneedtodecideifCamshiftwasoriginallydevelopedthefaceyoudetectedineachframeisforhands-freegaming.lt'sdesignedtoseriesexplainedhowtobeveryfastand"lightweight"sothe
2、thesameface.lfthedetectorfindsimplementandconfiguremorethanonefaceinaframe,you'dcomputercandoothertaskswhileneedtodecidewhichdetectionisthetracking.Sinceitwasdevelopedasafacedetection.Thismonth,oneyou'retracking.Finally,ifagaminginterface,Camshiftalsohasaninl'llshowyouhowtouseperson'
3、sheadtiltstowardsone(limited)abilitytodetectchangesshoulder,orturnstowardsprofileview,headposition,suchastiltingtheheadOpenCVtotrackataceoncethefrontalfacedetectorwillnolongertooneside.CouldyouusethatabilityriotcrtitcnJvvnrr'dnepdtohandlethattocommunicatewithyourrobot?you'vedetectedi
4、t.tvu"Comesituation,aswell.MaybetwofastheadtiltsmeanFortunately,OpenCVincludeshere,robot!"specializedcodefortrackingafaceFigure1showsOpenCV'sfaceFaceTrackinginefficiently,usingcontinuitybetweentrackerinaction-followingafaceasOpenCVframestohelpfindthebestmatchforittiltstoonesideanddur
5、ingaturntothefaceit'sfollowing.profile.TrackingafaceismoredrfficultThealgorithmthatOpenCVusesthantrackingastrongly-coloredobject.forfacetrackingiscalledCamshiftTheCamshiftDemoSkinreflectstheambientlightinsubtle,Camshiftusescolorinformation,butchangingwaysasaperson'sheadratherthanrely
6、ingonasinglecolor,itTheOpenCVsamplesdirectorYturnsortilts.tracksacombinationofcolors.Sinceitcontainsaprogramcalledcamshrft-Inprinciple,youcouldtrackafacetracksbycolor,itcanfollowafacedemo.Youcangetsomegoodhands-bylocatingitoverandoverIneverythroughorientationchangesthattheonexperienc
7、eandanintuitivefeelforframe,usingtheHaardetectorHaardetectorcan'thandle.Thesidebar,theCamshiftalgorithmwiththisdemo"HowOpenCV'sprogram.HerearethestepsfordoingFaceTrackerWorks,"that:explainsthisalgo-1)Pluginawebcam.FIGURE1.OpenCV'sfacetrackerinaction,2)Launchtheprogramcalledcamshift-I
8、t'sabletofol