当前位置:网站首页>2022-07-04 matlab读取视频帧并保存
2022-07-04 matlab读取视频帧并保存
2022-07-07 16:50:00 【紫云无堤】
%%
filename = dir('**/*.mp4');
parfor fileIndex = 1:size(filename, 1)
frameFolder = strcat(filename(fileIndex).folder, '\ImageTest');
if ~exist(frameFolder, 'dir')
mkdir(frameFolder);
end
file = strcat(filename(fileIndex).folder, '\',filename(fileIndex).name);
obj = VideoReader(file);
% Number of frames
numFrames = obj.NumFrames;
for k = 1 : numFrames
% Read frame
frame = read(obj, k);
% Show frame image
% imshow(frame);
% Save frame image 0001.jpg, 0002.jpg
imwrite(frame,strcat(frameFolder, '\',sprintf('%04d.jpg',k)),'jpg');
end
end
边栏推荐
- [trusted computing] Lesson 11: TPM password resource management (III) NV index and PCR
- Tsinghua, Cambridge and UIC jointly launched the first Chinese fact verification data set: evidence-based, covering many fields such as medical society
- RIP和OSPF的区别和配置命令
- Three forms of multimedia technology commonly used in enterprise exhibition hall design
- Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
- Reinforcement learning - learning notes 8 | Q-learning
- debian10编译安装mysql
- 企业展厅设计中常用的三种多媒体技术形式
- Win11C盘满了怎么清理?Win11清理C盘的方法
- Some key points in the analysis of spot Silver
猜你喜欢
Introduction of common API for socket programming and code implementation of socket, select, poll, epoll high concurrency server model
Will low code help enterprises' digital transformation make programmers unemployed?
Reinforcement learning - learning notes 8 | Q-learning
3分钟学会制作动态折线图!
Learn to make dynamic line chart in 3 minutes!
嵌入式C语言程序调试和宏使用的技巧
Three forms of multimedia technology commonly used in enterprise exhibition hall design
【塔望方法论】塔望3W消费战略 - U&A研究法
[principle and technology of network attack and Defense] Chapter 1: Introduction
Comparison and selection of kubernetes Devops CD Tools
随机推荐
Kubernetes DevOps CD工具对比选型
Tips of this week 141: pay attention to implicit conversion to bool
Tips for short-term operation of spot silver that cannot be ignored
Rules for filling in volunteers for college entrance examination
Redis
来了!GaussDB(for Cassandra)新特性亮相
Static routing configuration
强化学习-学习笔记8 | Q-learning
Five network IO models
Tear the Nacos source code by hand (tear the client source code first)
面试唯品会实习测试岗、抖音实习测试岗【真实投稿】
nest. Database for getting started with JS
不能忽略的现货白银短线操作小技巧
Thread pool and singleton mode and file operation
CVPR 2022丨学习用于小样本语义分割的非目标知识
Do you really understand sticky bag and half bag? 3 minutes to understand it
Improve application security through nonce field of play integrity API
[principles and technologies of network attack and Defense] Chapter 5: denial of service attack
2022年理财有哪些产品?哪些适合新手?
Unlike the relatively short-lived industrial chain of consumer Internet, the industrial chain of industrial Internet is quite long