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

本站现有博文309篇,共被浏览736418

本站已经建立2373天!

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