Add shopping red packet detection tests and sample image
- Implemented a test script for shopping red packet detection using pixel analysis and OCR. - Created a sample image to simulate a shopping red packet for testing purposes. - Added functions to test pixel detection, coordinate definitions, and OCR keyword matching. - Included detailed print statements for test results and summaries.
This commit is contained in:
1 parent
b3011dd9ce
commit
fb0c07c91a
30 files changed
+1269
-319
No files matched your search
@@ -209,6 +209,11 @@ class ConfigManager:
|
||||
config["high_value_fudai_after_action"] or "continue"
|
||||
)
|
||||
|
||||
if "high_value_fudai_poll_before_seconds" in config:
|
||||
analyser.high_value_fudai_poll_before_seconds = float(
|
||||
config["high_value_fudai_poll_before_seconds"] or 10.0
|
||||
)
|
||||
|
||||
if "high_value_fudai_after_stay_seconds" in config:
|
||||
analyser.high_value_fudai_after_stay_seconds = int(
|
||||
config["high_value_fudai_after_stay_seconds"] or 120
|
||||
|
||||
@@ -314,9 +314,7 @@ class HelperFunctions:
|
||||
pass
|
||||
|
||||
# 记录未中奖日志,用于GUI统计
|
||||
analyser._log_kv(
|
||||
"开奖结果", "没有抽中,关闭弹窗", log_type="RESULT"
|
||||
)
|
||||
analyser._log_kv("开奖结果", "没有抽中,关闭弹窗", log_type="RESULT")
|
||||
|
||||
# 切换下一个直播间
|
||||
try:
|
||||
@@ -354,9 +352,7 @@ class HelperFunctions:
|
||||
pass
|
||||
|
||||
# 记录中奖日志,用于GUI统计
|
||||
analyser._log_kv(
|
||||
"开奖结果", "检测到中奖结果", log_type="RESULT"
|
||||
)
|
||||
analyser._log_kv("开奖结果", "检测到中奖结果", log_type="RESULT")
|
||||
|
||||
try:
|
||||
# 确保有最新截图
|
||||
|
||||
Reference in new issue
Block a user