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

本站现有博文320篇,共被浏览757196

本站已经建立2422天!

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