优化后台截图功能

This commit is contained in:
Your Name committed 2025-12-31 11:55:01 +08:00
1 parent 223c127e11
commit ace3bbfa04
70 files changed
+4392 -871

No files matched your search

+2
View File
@@ -51,6 +51,8 @@ __all__ = [
+7 -6
View File
@@ -466,8 +466,9 @@ def check_have_fudai_with_ready_screenshot(
import numpy as _np
# 计算检测区域,考虑分辨率缩放和偏移
y0 = 403 * ry // 2400 + y_pianyi_val
x1 = max(0, 41 * rx // 1080)
# 将像素检测的扫描带左上角改为图片坐标 x=157, y=354(右下不变)
y0 = 354 * ry // 2400 + y_pianyi_val
x1 = max(0, 157 * rx // 1080)
x2 = min(width, 410 * rx // 1080)
y_top = max(0, y0 - 3)
y_bottom = min(height, y0 + 4)
@@ -1237,11 +1238,11 @@ def check_have_fudai_with_ready_screenshot(
y_pianyi_val = 0
# 定义搜索区域(仅在更小的范围内寻找福袋图标)
# X范围:160-269(1080基准)
# Y范围:348-451(2400基准)
search_x1 = max(0, 160 * rx // 1080)
# X范围:157-269(1080基准) # 左上角 X 改为图片中的坐标 x=157(右下不变)
# Y范围:354-451(2400基准) # 左上角 Y 改为图片中的坐标 y=354(右下不变)
search_x1 = max(0, 157 * rx // 1080)
search_x2 = min(screenshot_img.shape[1], 269 * rx // 1080)
search_y1_base = 348 * ry // 2400 + y_pianyi_val
search_y1_base = 354 * ry // 2400 + y_pianyi_val
search_y2_base = 451 * ry // 2400 + y_pianyi_val
search_y1 = max(0, search_y1_base)
search_y2 = min(screenshot_img.shape[0], search_y2_base)