資源簡介
幀間差分法,采用matlab實現(xiàn),資源內(nèi)有視頻文件,運(yùn)行即可。親測有效。
代碼片段和文件信息
foregroundDetector?=?vision.ForegroundDetector(‘NumGaussians‘?3?‘NumTrainingframes‘?50);
video?=?vision.VideoFileReader(‘movie.avi‘);
se?=?strel(‘square‘?3);
blobAnalysis?=?vision.BlobAnalysis(‘BoundingBoxOutputPort‘?true?...
????‘AreaOutputPort‘?false?‘CentroidOutputPort‘?false?...
????‘MinimumBlobArea‘?150);
while?~isDone(video)
????frame?=?step(video);
????foreground?=?step(foregroundDetector?frame);
????filteredForeground?=?imopen(foreground?se);???????%圖像開運(yùn)算
????box?=?step(blobAnalysis?filteredForeground);
????result?=?insertShape(frame?‘Rectangle‘?box?‘Color‘?‘green‘);
????imshow(result);
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???25414140??2012-11-09?11:03??幀間差分法matlab\movie.avi
?????文件????????643??2019-02-23?17:16??幀間差分法matlab\test.m
????..A.SH.?????12800??2016-06-11?11:01??幀間差分法matlab\Thumbs.db
?????目錄??????????0??2019-02-23?17:17??幀間差分法matlab
-----------?---------??----------?-----??----
?????????????25427583????????????????????4
評論
共有 條評論