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

本站现有博文333篇,共被浏览917467

本站已经建立2622天!

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