视频分帧代码

clc;
clear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
video_file=‘vipmen.avi’;
video=VideoReader(video_file);
numFrames =video.NumberOfFrames;% 帧的总数

for k = 1 : numFrames% 读取数据
frame = read(video,k);
imshow(frame);%显示帧
imwrite(frame,strcat(‘E:\picute’,num2str(k),’.jpg’),‘jpg’);% 保存帧
end

上一篇:one-shot learning


下一篇:高级停靠(Dock)技术的实现(转)