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

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

本站已经建立2583天!

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