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

本站现有博文327篇,共被浏览828949

本站已经建立2534天!

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