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

本站现有博文328篇,共被浏览838896

本站已经建立2543天!

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