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);

Réponses (0)

Cette question est clôturée.

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by