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

本站现有博文315篇,共被浏览745896

本站已经建立2392天!

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