deskew
Skew detection and correction in images containing text
Decision gist · record as of 2026-08-14
Yes. Deskew solves a specific, well-defined problem (skew detection in text images) with low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. It is suitable for document processing and OCR preprocessing workflows. Install it if you need to detect or correct image rotation in text-heavy documents.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later
- Low friction: pure Python wheel with only numpy and scikit-image as runtime dependencies.
- Active maintenance with recent release (72 days ago) and 524 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal attribution requirements.
last release 2026-06-03 (72 days) · last repo commit 2026-08-14 · 524 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 79,574 downloads/mo, #14,349 on PyPI
Alternatives
Verify before relying
pip install deskew
from deskew import determine_skew
import numpy as np
from skimage import io
from skimage.color import rgb2gray
from skimage.transform import rotate
image = io.imread('input.png')
grayscale = rgb2gray(image)
angle = determine_skew(grayscale)
rotated = rotate(image, angle, resize=True) * 255
io.imsave('output.png', rotated.astype(np.uint8))- Accuracy of skew detection across different document types, resolutions, and languages
- Performance characteristics on large batches or high-resolution images
- Whether the debug_images extra dependency set is necessary for typical use cases
What it is and what it does
Deskew is a Python library that detects and corrects image skew—the rotation angle of text or documents in images. It analyzes grayscale images to determine the rotation angle (between -45 and 45 degrees by default, or -90 to 90 with the `angle_pm_90` option) and returns that angle for use in downstream rotation. The library works with both scikit-image and OpenCV workflows, accepting numpy arrays and integrating into standard image processing pipelines.
The package is designed for document scanning, OCR preprocessing, and text image normalization. It depends on numpy for numerical operations and scikit-image for image manipulation, making it lightweight and suitable for batch processing. A CLI tool is also provided for quick angle detection or direct deskewing of image files, and optional debug output is available to tune detection parameters when results are suboptimal.
Use it for
- Preprocess scanned documents for OCR by detecting and reporting their rotation angle
- Straighten photographs of text-heavy documents before feeding to text recognition systems
- Batch-correct skewed images in document digitization pipelines
- Detect rotation angle in document images without rotating, for logging or analysis
- Integrate skew correction into image processing workflows using scikit-image or OpenCV
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Deskew solves a specific, well-defined problem (skew detection in text images) with low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. It is suitable for document processing and OCR preprocessing workflows. Install it if you need to detect or correct image rotation in text-heavy documents.
Install
deskew on PyPI
Before you install
Low friction: pure Python wheel with only numpy and scikit-image as runtime dependencies. Active maintenance with recent release (72 days ago) and 524 repository stars.
Requires Python 3.11 or later
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal attribution requirements.
Quickstart
pip install deskew
from deskew import determine_skew
import numpy as np
from skimage import io
from skimage.color import rgb2gray
from skimage.transform import rotate
image = io.imread('input.png')
grayscale = rgb2gray(image)
angle = determine_skew(grayscale)
rotated = rotate(image, angle, resize=True) * 255
io.imsave('output.png', rotated.astype(np.uint8))
Verify before relying
- Accuracy of skew detection across different document types, resolutions, and languages
- Performance characteristics on large batches or high-resolution images
- Whether the debug_images extra dependency set is necessary for typical use cases
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesnumpyscikit-image |
| Maintenance | Actively maintained 72 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 79,574 / month, #14,349 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Typing :: Typed |
Evidence: deskew-1.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “image skew detection”
- deskewDetects and corrects image skew (rotation) in documents and…
- whylogswhylogs generates statistical profiles of datasets to track data…
- percentifyPercentify provides one-call exploratory statistics and data-quality…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also qrdet · rembg · scikit-image · imutils · imgaug · qreader · pyquaternion · PyWinBox · ocrmypdf · python-doctr