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

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

本站已经建立2602天!

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