Loading rpc/methods.py +3 −1 Original line number Diff line number Diff line Loading @@ -55,9 +55,11 @@ def _deskew(image_path: str, max_skew: int = 10, fast: bool = True) -> float: height, width, _ = im.shape if fast: scale_factor = 1000 / max(height, width) height = int(height * scale_factor) width = int(width * scale_factor) im = cv2.resize( im, (int(width * scale_factor), int(height * scale_factor)), (width, height), interpolation=cv2.INTER_LINEAR, ) im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) Loading Loading
rpc/methods.py +3 −1 Original line number Diff line number Diff line Loading @@ -55,9 +55,11 @@ def _deskew(image_path: str, max_skew: int = 10, fast: bool = True) -> float: height, width, _ = im.shape if fast: scale_factor = 1000 / max(height, width) height = int(height * scale_factor) width = int(width * scale_factor) im = cv2.resize( im, (int(width * scale_factor), int(height * scale_factor)), (width, height), interpolation=cv2.INTER_LINEAR, ) im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) Loading