当前位置:网站首页>2022-07-04 matlab reads video frames and saves them
2022-07-04 matlab reads video frames and saves them
2022-07-07 18:55:00 【Ziyun Wudi】
%%
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
边栏推荐
- 你真的理解粘包与半包吗?3分钟搞懂它
- NAT地址转换
- 来了!GaussDB(for Cassandra)新特性亮相
- 线程池和单例模式以及文件操作
- Interview vipshop internship testing post, Tiktok internship testing post [true submission]
- CVPR 2022丨学习用于小样本语义分割的非目标知识
- Reinforcement learning - learning notes 8 | Q-learning
- 【C语言】字符串函数
- Summary of debian10 system problems
- Sports Federation: resume offline sports events in a safe and orderly manner, and strive to do everything possible for domestic events
猜你喜欢

gsap动画库

Redis cluster and expansion

Using stored procedures, timers, triggers to solve data analysis problems

Tear the Nacos source code by hand (tear the client source code first)

Differences between rip and OSPF and configuration commands

Discuss | what preparations should be made before ar application is launched?

Cadre de validation des données Apache bval réutilisé

Industry case | digital operation base helps the transformation of life insurance industry

五种网络IO模型

Wireshark analyzes packet capture data * cap
随机推荐
链式二叉树的基本操作(C语言实现)
Differences between rip and OSPF and configuration commands
Ten thousand words nanny level long article -- offline installation guide for datahub of LinkedIn metadata management platform
AI defeated mankind and designed a better economic mechanism
Interview vipshop internship testing post, Tiktok internship testing post [true submission]
Year SQL audit platform
Calculation of torque target value (ftorque) in servo torque control mode
“解密”华为机器视觉军团:华为向上,产业向前
Idea completely uninstalls installation and configuration notes
Yearning-SQL审核平台
Charles+drony的APP抓包
Standard ACL and extended ACL
现货白银分析中的一些要点
嵌入式C语言程序调试和宏使用的技巧
The performance and efficiency of the model that can do three segmentation tasks at the same time is better than maskformer! Meta & UIUC proposes a general segmentation model with better performance t
静态路由配置
RIP和OSPF的区别和配置命令
『HarmonyOS』DevEco的下载安装与开发环境搭建
Rules for filling in volunteers for college entrance examination
Redis