标签:frame http name 成功 ext number amp filename atl
把视频抽帧,转化成图片
我的代码如下,成功实现
clc;
clear;
videofilename=‘k:\GraduationWork\Resource\video.wmv‘; %where you put the video file
video=VideoReader(videofilename);
frame_number=floor(video.Duration*video.FrameRate);
while hasFrame(video)
image_name=strcat(‘e:\graduationwork\frames\‘,num2str(i),‘.jpg‘);
frame=readFrame(video);
imwrite(frame,image_name,‘jpg‘);
frame=[];
end
标签:frame http name 成功 ext number amp filename atl
原文地址:http://www.cnblogs.com/guohaoyu110/p/7470743.html