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

本站现有博文333篇,共被浏览918720

本站已经建立2624天!

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