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

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

本站已经建立2557天!

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