Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed May 3, 2024
1 parent cfba025 commit 37df762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctr/models/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def estimate_orientation(
if img.shape[-1] == 3:
gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gray_img = cv2.medianBlur(gray_img, 5)
thresh = cv2.threshold(gray_img, thresh=0, maxval=255, type=cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1] # type: ignore[assignment]
thresh = cv2.threshold(gray_img, thresh=0, maxval=255, type=cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1]
else:
thresh = img.astype(np.uint8)

Expand Down

0 comments on commit 37df762

Please sign in to comment.