Why the frames pass too quikly

I run the foreground detector and blob analysis command but output video frames pass too quickly
videoSource = vision.VideoFileReader('abc.avi',...
'ImageColorSpace','Intensity','VideoOutputDataType','uint8');
detector = vision.ForegroundDetector('NumTrainingFrames', 75, ...
'InitialVariance', 100*100);
blob = vision.BlobAnalysis('CentroidOutputPort', false, 'AreaOutputPort',...
false, 'BoundingBoxOutputPort', true, 'MinimumBlobAreaSource','Property',...
'MinimumBlobArea', 30);
shapeInserter = vision.ShapeInserter('BorderColor', 'White');
VideoPlayer = vision.VideoPlayer();
while ~isDone(videoSource)
frame = step(videoSource);
fgMask = step(detector, frame);
bbox = step(blob, fgMask);
out = step(shapeInserter, frame, bbox);
step(VideoPlayer, out);
end
release(VideoPlayer);
release(videoSource);

回答 (0 件)

この質問は閉じられています。

質問済み:

2017 年 4 月 14 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by