Skip to content

Commit

Permalink
test: pointer api log test
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsj4653 committed Feb 21, 2024
1 parent 827c03c commit ac5800d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OCR/googleOCR.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ def text_pointer(uri, x, y):
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)))) # (단어, 단어의 가운데 좌표 값과 손 좌표 간 거리)

print(words)

words.sort(key=lambda x: x[1]) # 손과 가장 가까운 단어를 반환
print(words)
# 가장 긴 문자열 찾기
if words:
result_string = words[0]
Expand Down

0 comments on commit ac5800d

Please sign in to comment.