%% 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
读取视频,并逐帧按序保存成图片
最新推荐文章于 2024-07-11 10:34:15 发布
本文介绍如何利用MATLAB从视频文件中读取每一帧,并按顺序保存为图片,涉及视频处理的基础操作。
摘要由CSDN通过智能技术生成