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

本站现有博文338篇,共被浏览977620次

本站已经建立2690天!

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