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

本站现有博文332篇,共被浏览900264

本站已经建立2601天!

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