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