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

本站现有博文333篇,共被浏览922327

本站已经建立2628天!

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