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

本站现有博文322篇,共被浏览787990

本站已经建立2482天!

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