Deskew is a Python library for detecting and correcting skew in images containing text. It uses OpenCV and scikit-image to compute the skew angle via projection profile or Hough transform methods. Current version: 1.6.1, requires Python >= 3.11. Releases are occasional.
pip install deskewNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Detect skew angle in a grayscale image and rotate to correct.
Upgrade Python to 3.11 or later.
Convert image to grayscale using cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) before passing to determine_skew.
Use 'from deskew import determine_skew' instead of 'from deskew.deskew import determine_skew'.
Install using 'pip install deskew'
Use 'from deskew import determine_skew'
Ensure the image path is correct and the image is loaded properly: 'img = cv2.imread('path.jpg')' and check img is not None.