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

本站现有博文324篇,共被浏览809353

本站已经建立2512天!

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