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

本站现有博文328篇,共被浏览850709

本站已经建立2557天!

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