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

本站现有博文339篇,共被浏览1000178次

本站已经建立2710天!

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