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

本站现有博文330篇,共被浏览861567

本站已经建立2570天!

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