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

本站现有博文332篇,共被浏览900751

本站已经建立2602天!

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