Loading rpc/methods.py +3 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,9 @@ 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: if lines is None: return 0 if not any(lines): return 0 # Collect the angles of these lines (in radians) angles = [] Loading Loading
rpc/methods.py +3 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,9 @@ 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: if lines is None: return 0 if not any(lines): return 0 # Collect the angles of these lines (in radians) angles = [] Loading