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

本站现有博文338篇,共被浏览977931次

本站已经建立2690天!

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