当前位置:网站首页>Opencv combines multiple pictures into video
Opencv combines multiple pictures into video
2022-04-23 03:01:00 【Cat loving Wu Xiaoyuan】
opencv Combine multiple images into a video
List of articles
import os
import cv2
path = 'E:\\contest\\insect\\insect\\JPEGImages\\val'
filelist = os.listdir(path)
filelist = sorted(filelist)
fps = 24 # Video per second 24 frame
size = (604, 604) # The size of the picture that needs to be converted to video
# have access to cv2.resize() Make changes
video = cv2.VideoWriter("my.avi", cv2.VideoWriter_fourcc('I', '4', '2', '0'), fps, size)# establish .avi
# The video is saved in the current directory
for item in filelist:
if item.endswith('.jpeg'):
# Find all suffixes in the path .jpeg Pictures of the
item = os.path.join(path,item)
img = cv2.imread(item)
img=cv2.resize(img,(604, 604))#resize picture
#print(img)
video.write(img)
video.release()
cv2.destroyAllWindows()
success
版权声明
本文为[Cat loving Wu Xiaoyuan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220634108086.html
边栏推荐
- Flink learning (XI) watermark
- Huashu "deep learning" and code implementation: 01 Linear Algebra: basic concepts + code implementation basic operations
- VirtualBox virtual machine (Oracle VM)
- Face longitude:
- Log4j knowledge point record
- Encapsulate components such as pull-down menu based on ele
- tf. keras. layers. Conv? D function
- Winsock programming interface experiment: implementation of ipconfig
- 【Hcip】OSPF常用的6种LSA详解
- Deep q-network (dqn)
猜你喜欢
REINFORCE
Actual combat of industrial defect detection project (IV) -- ceramic defect detection based on hrnet
Linux redis - redis database caching service
L2-006 树的遍历(中后序确定二叉树&层序遍历)
国产轻量级看板式Scrum敏捷项目管理工具
Linux Redis——Redis 数据库缓存服务
Introduction to ACM [TSP problem]
windows MySQL8 zip安装
Solve the problem that PowerShell mining occupies 100% of cpu7 in win7
Traversée de l'arbre L2 - 006
随机推荐
《信息系統項目管理師總結》第六章 項目人力資源管理
Detailed explanation of distributed things
【工欲善其事必先利其器】论文编辑及文献管理(Endnote,Latex,JabRef ,overleaf)资源下载及使用指南
HLS / chisel uses CORDIC hyperbolic system to realize square root calculation
L2-006 树的遍历(中后序确定二叉树&层序遍历)
Résumé du gestionnaire de projet du système d'information Chapitre VI gestion des ressources humaines du projet
Table space capacity query and expansion of Oracle Database
tf. keras. layers. Embedding function
@Usage and difference between mapper and @ repository
Introduction to ACM [inclusion exclusion theorem]
How can enterprises with major hazard installations ensure the completion of the digital construction task of double prevention mechanism by the end of the year
B blocks of the 46th ICPC Asian regional competition (Kunming)
ROP Emporium x86_64 7~8题
Planning code ROS migration POMDP prediction planning (I)
Chapter VII project communication management of information system project manager summary
HLS / chisel practice CORDIC high performance computing complex square root
JS learning notes
Difference between relative path and absolute path (often asked in interview)
leangoo脑图-共享式多人协作思维导图工具分享
《信息系统项目管理师总结》第四章 项目成本管理