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

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

本站已经建立2633天!

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