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

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

本站已经建立2493天!

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