Commit 239ae7a9 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

fix error in _deskew

parent 1567e763
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ def _deskew(image_path: str, max_skew: int = 10) -> float:
    lines = cv2.HoughLinesP(
        im_bw, 1, numpy.pi / 180, 200, minLineLength=width / 12, maxLineGap=width / 150
    )
    if not lines:
        return 0
    # Collect the angles of these lines (in radians)
    angles = []
    for line in lines: