当前位置:网站首页>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
边栏推荐
- 体总:安全有序恢复线下体育赛事,力争做到国内赛事应办尽办
- 【demo】循环队列及条件锁实现goroutine间的通信
- Redis集群与扩展
- 静态路由配置
- Summary of evaluation indicators and important knowledge points of regression problems
- 你真的理解粘包与半包吗?3分钟搞懂它
- 将模型的记忆保存下来!Meta&UC Berkeley提出MeMViT,建模时间支持比现有模型长30倍,计算量仅增加4.5%...
- Ten thousand words nanny level long article -- offline installation guide for datahub of LinkedIn metadata management platform
- 高考填志愿规则
- 单臂路由和三层交换的简单配置
猜你喜欢

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

能同时做三个分割任务的模型,性能和效率优于MaskFormer!Meta&UIUC提出通用分割模型,性能优于任务特定模型!开源!...

Discuss | frankly, why is it difficult to implement industrial AR applications?

【塔望方法论】塔望3W消费战略 - U&A研究法

Wireshark分析抓包数据*.cap

Redis集群与扩展

回归问题的评价指标和重要知识点总结

DataSimba推出微信小程序,DataNuza接受全场景考验? | StartDT Hackathon

【软件测试】从企业版BOSS直聘,看求职简历,你没被面上是有原因的

Simple configuration of single arm routing and layer 3 switching
随机推荐
NAT地址转换
pip相关命令
[PaddleSeg源码阅读] PaddleSeg Validation 中添加 Boundary IoU的计算(1)——val.py文件细节提示
Discuss | what preparations should be made before ar application is launched?
[论文分享] Where’s Crypto?
用存储过程、定时器、触发器来解决数据分析问题
sqlite sql 异常 near “with“: syntax error
The highest level of anonymity in C language
五种网络IO模型
Year SQL audit platform
Win11C盘满了怎么清理?Win11清理C盘的方法
Redis
go语言的字符串类型、常量类型和容器类型
Learn to make dynamic line chart in 3 minutes!
Thread pool and singleton mode and file operation
[trusted computing] Lesson 11: TPM password resource management (III) NV index and PCR
Skills of embedded C language program debugging and macro use
【塔望方法论】塔望3W消费战略 - U&A研究法
Simple configuration of single arm routing and layer 3 switching
Recommend free online SMS receiving platform in 2022 (domestic and foreign)