Skip to content

Commit

Permalink
#177 强调优先选择窗口模式
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Feb 16, 2024
1 parent cbd117f commit 8312bb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sr/image/sceenshot/large_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_active_region_name(screen: MatLike, ocr: OcrMatcher) -> str:
:param ocr: ocr
:return: 当前选择区域
"""
lower = 240
lower = 230
upper = 255
part, _ = cv2_utils.crop_image(screen, REGION_LIST_RECT)
bw = cv2.inRange(part, (lower, lower, lower), (upper, upper, upper))
Expand All @@ -188,7 +188,7 @@ def get_active_region_name(screen: MatLike, ocr: OcrMatcher) -> str:
return None
rect = Rect(left[0] - 10, top[1] - 10, right[0] + 10, bottom[1] + 10)
to_ocr: MatLike = cv2_utils.crop_image(bw, rect)[0]
# cv2_utils.show_image(to_ocr, win_name='get_active_region_name')
cv2_utils.show_image(to_ocr, win_name='get_active_region_name')
return ocr.ocr_for_single_line(to_ocr, strict_one_line=False)


Expand Down

0 comments on commit 8312bb9

Please sign in to comment.