xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 16KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-10
  • 語(yǔ)言: Matlab
  • 標(biāo)簽:

資源簡(jiǎn)介

卡爾曼濾波跟蹤視頻目標(biāo)matlab程序,簡(jiǎn)單易懂

資源截圖

代碼片段和文件信息

function?multiobjectTracking()

%?create?system?objects?used?for?reading?video?detecting?moving?objects
%?and?displaying?the?results
obj?=?setupSystemobjects();?%初始化函數(shù)
tracks?=?initializeTracks();?%?create?an?empty?array?of?tracks??%初始化軌跡對(duì)象

nextId?=?1;?%?ID?of?the?next?track

%?detect?moving?objects?and?track?them?across?video?frames
while?~isDone(obj.reader)
????frame?=?readframe();??%讀取一幀
????[centroids?bboxes?mask]?=?detectobjects(frame);?%前景檢測(cè)
????predictNewLocationsOfTracks();??%根據(jù)位置進(jìn)行卡爾曼預(yù)測(cè)
????[assignments?unassignedTracks?unassignedDetections]?=?...
????????detectionToTrackAssignment();?%匈牙利匹配算法進(jìn)行匹配
????
????updateAssignedTracks();%分配好的軌跡更新
????updateUnassignedTracks();%未分配的軌跡更新
????deleteLostTracks();%刪除丟掉的軌跡
????createNewTracks();%創(chuàng)建新軌跡
????
????displayTrackingResults();%結(jié)果展示
end


%%?Create?System?objects
%?Create?System?objects?used?for?reading?the?video?frames?detecting
%?foreground?objects?and?displaying?results.

????function?obj?=?setupSystemobjects()
????????%?Initialize?Video?I/O
????????%?Create?objects?for?reading?a?video?from?a?file?drawing?the?tracked
????????%?objects?in?each?frame?and?playing?the?video.
????????
????????%?create?a?video?file?reader
????????obj.reader?=?vision.VideoFileReader(‘a(chǎn)trium.avi‘);?????????%讀入視頻
????????
????????%?create?two?video?players?one?to?display?the?video
????????%?and?one?to?display?the?foreground?mask
????????obj.videoPlayer?=?vision.VideoPlayer(‘Position‘?[20?400?700?400]);???%創(chuàng)建兩個(gè)窗口
????????obj.maskPlayer?=?vision.VideoPlayer(‘Position‘?[740?400?700?400]);
????????
????????%?Create?system?objects?for?foreground?detection?and?blob?analysis
????????
????????%?The?foreground?detector?is?used?to?segment?moving?objects?from
????????%?the?background.?It?outputs?a?binary?mask?where?the?pixel?value
????????%?of?1?corresponds?to?the?foreground?and?the?value?of?0?corresponds
????????%?to?the?background.?
????????
????????obj.detector?=?vision.ForegroundDetector(‘NumGaussians‘?3?...???%GMM進(jìn)行前景檢測(cè),高斯核數(shù)目為3,前40幀為背景幀,域值為0.7
????????????‘NumTrainingframes‘?40?‘MinimumBackgroundRatio‘?0.7);???
????????
????????%?Connected?groups?of?foreground?pixels?are?likely?to?correspond?to?moving
????????%?objects.??The?blob?analysis?system?object?is?used?to?find?such?groups
????????%?(called?‘blobs‘?or?‘connected?components‘)?and?compute?their
????????%?characteristics?such?as?area?centroid?and?the?bounding?box.
????????
????????obj.blobAnalyser?=?vision.BlobAnalysis(‘BoundingBoxOutputPort‘?true?...??%輸出質(zhì)心和外接矩形
????????????‘AreaOutputPort‘?true?‘CentroidOutputPort‘?true?...
????????????‘MinimumBlobArea‘?400);
????end

%%?Initialize?Tracks
%?The?|initializeTracks|?function?creates?an?array?of?tracks?where?each
%?track?is?a?structure?representing?a?moving?object?in?the?video.?The
%?purpose?of?the?structure?is?to?maintain?the?state?of?a?tracked?object.
%?The?state?consists?of?information?used?for?detection?to?track

評(píng)論

共有 條評(píng)論

相關(guān)資源