Hello everyone.I would to ask a question. When processing video, how to read an image every second.

2 ビュー (過去 30 日間)
Wesley
Wesley 2021 年 5 月 23 日
コメント済み: darova 2021 年 5 月 23 日
v = VideoReader('exampleVideo.mp4');
time = [10, 20, 30, 40, 50]; %How to automatically read the image corresponding to each second.
for i=1:numel(time)
if time(i)<v.Duration
v.CurrentTime = time(i);
frame = readFrame(v);
figure; imshow(frame); %Perform processing on the frame here
end
end

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by