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

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

本站已经建立2442天!

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