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

本站现有博文323篇,共被浏览795598

本站已经建立2493天!

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