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

本站现有博文335篇,共被浏览937398

本站已经建立2648天!

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