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

本站现有博文324篇,共被浏览816050

本站已经建立2520天!

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