def detect_money(top_left_corner, bottom_right_corner):
global client_version
money_icon_path = 'Tools/screenshots/money_icon_' + client_version + '.png'
money_icon_loc = pyautogui.locateOnScreen(money_icon_path, region=(top_left_corner[0], top_left_corner[1], bottom_right_corner[0]-top_left_corner[0], bottom_right_corner[1] - top_left_corner[1]))
money_val_loc = (money_icon_loc[0]+22, money_icon_loc[1], money_icon_loc[0]+100, money_icon_loc[1]+18)
image = screengrab_as_numpy_array(money_val_loc)
money_val = tesser_money_image(image)
return(money_val)
评论列表
文章目录