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

本站现有博文341篇,共被浏览1034064次

本站已经建立2723天!

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