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

本站现有博文311篇,共被浏览742920

本站已经建立2383天!

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