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

本站现有博文332篇,共被浏览869407

本站已经建立2578天!

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