EADST

Python: Resize the Image Size

Resize the image size with Python OpenCV.

import cv2

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

本站现有博文321篇,共被浏览764980

本站已经建立2443天!

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