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

本站现有博文321篇,共被浏览764952

本站已经建立2443天!

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