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

本站现有博文340篇,共被浏览1019365次

本站已经建立2719天!

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