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

本站现有博文321篇,共被浏览776381

本站已经建立2467天!

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