Skip to content

Instantly share code, notes, and snippets.

View IPlayZed's full-sized avatar
:octocat:
Dₒᵢₙg ₛₒₘₑₜₕᵢₙg ₍ₚᵣₒbₐbₗy₎.

Börcsök Balázs Róbert IPlayZed

:octocat:
Dₒᵢₙg ₛₒₘₑₜₕᵢₙg ₍ₚᵣₒbₐbₗy₎.
View GitHub Profile
@IPlayZed
IPlayZed / deskew.py
Last active January 28, 2023 18:43 — forked from russss/deskew.py
Automatic scanned image rotation/deskew with OpenCV
#Forked by Balázs Börcsök.
#Licensed under GNU GPL v2: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
import cv2
import numpy as np
def deskew(im, max_skew=10):
height, width = im.shape
# Create a grayscale image and denoise it