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

本站现有博文337篇,共被浏览961505次

本站已经建立2673天!

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