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

本站现有博文337篇,共被浏览961889次

本站已经建立2674天!

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