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

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

本站已经建立2493天!

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