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

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

本站已经建立2669天!

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