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

本站现有博文323篇,共被浏览799246

本站已经建立2498天!

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