Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Machine Learning
  3. imutils

imutils

MITPython

A collection of convenience functions to simplify common image processing tasks with OpenCV and Python.

GitHubGitHub
4.6k stars1.0k forks0 contributors

What is imutils?

imutils is a Python package that provides a series of convenience functions to simplify common image processing tasks when using OpenCV. It reduces boilerplate code for operations like translation, rotation, resizing, skeletonization, and displaying images with Matplotlib, making computer vision workflows more efficient and readable. The package is compatible with both Python 2.7 and Python 3.

Target Audience

Python developers and researchers working with OpenCV for computer vision projects who want to reduce repetitive code and simplify image manipulation tasks.

Value Proposition

Developers choose imutils because it eliminates the need to write verbose OpenCV code for common operations, provides helper functions for tasks OpenCV doesn't handle directly (like skeletonization), and ensures compatibility across different OpenCV versions and Python releases.

Overview

A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.

Use Cases

Best For

  • Simplifying OpenCV image transformations like rotation and translation
  • Maintaining aspect ratio while resizing images in OpenCV
  • Converting OpenCV images for proper display in Matplotlib
  • Downloading images directly from URLs into OpenCV format
  • Automating Canny edge detection parameter selection
  • Performing perspective transforms for document scanning applications

Not Ideal For

  • Projects requiring fine-grained control over OpenCV's low-level parameters and transformation matrices
  • Teams using image processing libraries other than OpenCV, such as PIL/Pillow or scikit-image
  • Applications where performance optimization is critical and abstraction layers introduce unacceptable overhead

Pros & Cons

Pros

Boilerplate Reduction

Functions like `translate` and `rotate` abstract away manual matrix construction and `cv2.warpAffine` calls, as shown in the translation and rotation examples, reducing code verbosity.

Aspect Ratio Maintenance

The `resize` function automatically preserves aspect ratio when specifying width or height, eliminating the need for manual calculations, demonstrated in the resizing demo.

Cross-Version Compatibility

Includes `is_cv2` and `is_cv3` functions to handle API differences between OpenCV versions, ensuring code works across environments, as highlighted in the version checking section.

Convenience Utilities

Features like `url_to_image` for downloading images and `auto_canny` for edge detection simplify tasks not directly covered by OpenCV, with examples provided in the README.

Cons

Limited Scope

Focuses on basic image manipulations; lacks support for advanced OpenCV features such as deep learning modules, real-time video processing, or modern computer vision algorithms.

Outdated Dependencies

Advertises compatibility with Python 2.7, which is deprecated, and may not be actively updated for newer Python versions or OpenCV 4+, risking obsolescence.

External Documentation Reliance

Detailed tutorials are linked to external PyImageSearch blog posts, which might not be maintained and require additional navigation for comprehensive guidance, as noted in the README.

Frequently Asked Questions

Quick Stats

Stars4,591
Forks1,027
Contributors0
Open Issues97
Last commit1 year ago
CreatedSince 2015

Tags

#python-library#opencv#image-processing#image-manipulation#computer-vision

Built With

O
OpenCV
P
Python
N
NumPy
m
matplotlib
S
SciPy

Included in

Machine Learning72.2k
Auto-fetched 1 day ago

Related Projects

face_recognitionface_recognition

The world's simplest facial recognition api for Python and the command line

Stars56,322
Forks13,729
Last commit1 year ago
timmtimm

The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more

Stars36,682
Forks5,146
Last commit2 days ago
detectron2detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.

Stars34,348
Forks7,924
Last commit17 days ago
OpenposeOpenpose

OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation

Stars33,990
Forks8,055
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub