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

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

本站已经建立2583天!

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