%% This script can zoom video without scale limit, the video format include .mp4/.mkv/.avi
% FileName : video_resize.m
% Author : QJX
% Version : 1.0
% Time : 2020.07.30
clc
clear
mov = VideoReader("raw_video.mp4"); % read the video
% implay("raw_video.mp4"); % play the video
mov_frames = mov.NumberOfFrames; % get frames of video
video_height = mov.Height; % get the height and width of video
video_width = mov.Width;
for k = 1:mov_frames % read the frame of video and save
im = read(mov,k);
imwrite(im,['original_frame',num2str(k),'.bmp'],'bmp');
end
读取视频,并逐帧按序保存保存成图片
猜你喜欢
转载自blog.csdn.net/zhanshen112/article/details/107692913
今日推荐
周排行