By using computervision toolbox I'm trying to play a video in MATLAB using this code, but only one frame is displayed on the window

1 回表示 (過去 30 日間)
a = vision.VideoFileReader('spur gear.avi' , 'VideoOutputDataType', 'double');
while ~isDone(a)
vidFrame = step(a);
c = imresize(vidFrame, 0.5);
imshow(c);
end
release(a);

回答 (1 件)

Turlough Hughes
Turlough Hughes 2020 年 2 月 28 日
You could do the following:
a = vision.VideoFileReader('spur gear.avi' , 'VideoOutputDataType', 'double');
VideoPlayer = vision.VideoPlayer
while ~isDone(a)
vidFrame = step(a);
c = imresize(vidFrame, 0.5);
step(VideoPlayer,c)
end
release(VideoPlayer);
release(a);

カテゴリ

Help Center および File ExchangeC4ISR についてさらに検索

製品


リリース

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by