首页 > 其他 > 详细

MATLAB图片折腾3

时间:2017-09-03 20:53:43      阅读:284      评论:0      收藏:0      [点我收藏+]
把视频抽帧,转化成图片

我的代码如下,成功实现
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

MATLAB图片折腾3

原文:http://www.cnblogs.com/guohaoyu110/p/7470743.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!