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

本站现有博文321篇,共被浏览775071

本站已经建立2465天!

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