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

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

本站已经建立2570天!

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