Skip to content

Commit

Permalink
Update jp_ocr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pur1fying committed Feb 17, 2024
1 parent ada9831 commit 594cc4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/ocr/jp_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def ocr(self, img):
lower_right = [int(max_x), int(max_y)]
rectangles.append((upper_left, upper_right, lower_right, lower_left))
rectangles.sort(key=lambda x: x[0][1])
for upper_left, lower_right in rectangles:
for upper_left, upper_right, lower_right, lower_left in rectangles:
img_list.append(img[upper_left[1]:lower_right[1], upper_left[0]:lower_right[0]])
res, _ = self.text_recognizer(img_list)
res_list = []
Expand Down

0 comments on commit 594cc4f

Please sign in to comment.