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

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

本站已经建立2578天!

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