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

本站现有博文321篇,共被浏览781310

本站已经建立2474天!

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