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

本站现有博文327篇,共被浏览828363

本站已经建立2534天!

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