Skip to content

Commit

Permalink
test: pointer log
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsj4653 committed Feb 21, 2024
1 parent ac5800d commit 887d1e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OCR/googleOCR.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def text_pointer(uri, x, y):
min_y = min(y_set)
max_y = max(y_set)

mid_x = max_x - min_x
mid_y = max_y - min_y
mid_x = min_x + (max_x - min_x) // 2
mid_y = min_y + (max_y - min_y) // 2

if min_x <= x <= max_x and min_y <= y <= max_y :
words.append((word, math.sqrt((abs(x - mid_x) ** 2) + (abs(y - mid_y) ** 2)))) # (단어, 단어의 가운데 좌표 값과 손 좌표 간 거리)
Expand Down

0 comments on commit 887d1e4

Please sign in to comment.