EADST

Python: Merge Images to the Video with OpenCV

Python: Merge Images to the Video with OpenCV

import os
import cv2

image=cv2.imread("./result/img0001.jpg")
save_prefix = "./test_mp4/"
image_info=image.shape
height=image_info[0]
width=image_info[1]
size=(height,width)
print(size)
fps=24
fourcc=cv2.VideoWriter_fourcc(*"mp4v")
video = cv2.VideoWriter('video_name.mp4', cv2.VideoWriter_fourcc(*"mp4v"), fps, (width,height)) 

for root, dirs, files in os.walk(save_prefix):
    files = sorted(files)
    for img in files:
        file_name = os.path.join(root, img)
        image=cv2.imread(file_name)
        video.write(image)
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
TSV tqdm Miniforge Conda Safetensors WAN Heatmap CAM OpenAI Data WebCrawler Ptyhon Hungarian Search LeetCode AI CEIR VPN Qwen2 Claude 腾讯云 ModelScope transformers Hilton Michelin Proxy Rebuttal Shortcut FP64 Bert GGML Video Tracking Google ms-swift PIP printf Sklearn Github Statistics COCO Qwen2.5 Mixtral HaggingFace CV Dataset LLAMA XGBoost 多线程 Baidu 报税 FP32 BeautifulSoup Disk Distillation Pandas Docker Clash YOLO RGB NLTK Logo Ubuntu Gemma Paper Magnet git InvalidArgumentError 多进程 递归学习法 签证 Transformers 公式 BTC Llama PDB JSON Animate 关于博主 SQLite Diagram HuggingFace Template Crawler TensorRT Pickle Image2Text Plate OpenCV MD5 PDF Windows Permission llama.cpp API 搞笑 CC UI Base64 Markdown XML Domain Zip Card CUDA Linux Numpy Algorithm Interview ResNet-50 Bin 强化学习 Paddle Cloudreve News 第一性原理 Bipartite ONNX Translation Pillow Plotly Streamlit PyTorch uwsgi OCR LaTeX NLP git-lfs logger Anaconda v2ray Website SVR Jupyter IndexTTS2 阿里云 图形思考法 icon 飞书 Attention FastAPI Use DeepStream 域名 mmap Freesound Quantization 顶会 Jetson 证件照 scipy Review DeepSeek RAR Pytorch GPT4 TensorFlow FlashAttention Vim VGG-16 Knowledge Qwen 图标 音频 Bitcoin 算法题 Vmess Quantize Land 论文速读 Excel Python VSCode tar Hotel GPTQ Input 财报 LLM torchinfo 版权 继承 Tiktoken ChatGPT v0.dev uWSGI BF16 CSV Color Breakpoint FP16 Web CLAP hf LoRA RL Git Agent GIT 论文 Random UNIX Firewall Tensor SAM GoogLeNet FP8 Datetime 净利润 Augmentation PyCharm 云服务器 Math EXCEL NameSilo Food C++ diffusers SPIE Password Django Nginx QWEN CTC TTS SQL
站点统计

本站现有博文333篇,共被浏览918074

本站已经建立2623天!

热门文章
文章归档
回到顶部