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

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

本站已经建立2538天!

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