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

本站现有博文340篇,共被浏览1019268次

本站已经建立2719天!

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