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

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

本站已经建立2538天!

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