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

本站现有博文320篇,共被浏览757197

本站已经建立2422天!

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