feat: Enhance yanghao detection with polygon support and template matching

- Updated config.json to include new parameters for yanghao template paths and match thresholds.
- Adjusted default icon match threshold in config to 0.70 for better detection.
- Implemented polygon detection logic in yanghao_idle function to allow for flexible ROI configurations.
- Added support for per-action ROI scaling and sizes in the configuration.
- Introduced new methods in fudai_analyse for capturing ROI screenshots and matching templates.
- Created a test script to validate polygon detection against provided templates.
- Improved error handling and logging for better debugging during detection processes.
This commit is contained in:
Your Name committed 2026-01-04 09:06:25 +08:00
1 parent 3678ff7e31
commit a61ba62864
8 files changed
+848 -26

No files matched your search

+11 -11
View File
@@ -266,18 +266,18 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
help="禁用福袋模板匹配(默认已禁用)",
)
p.add_argument(
"--yanghao-only",
action="store_true",
help="只执行推荐页养号流程(运行完成后退出)",
)
p.add_argument(
"--yanghao-only",
action="store_true",
help="只执行推荐页养号流程(运行完成后退出)",
)
p.add_argument(
"--yanghao-seconds",
type=int,
default=None,
help="仅在 --yanghao-only 时有效:覆盖推荐页养号停留秒数",
)
p.add_argument(
"--yanghao-seconds",
type=int,
default=None,
help="仅在 --yanghao-only 时有效:覆盖推荐页养号停留秒数",
)
return p.parse_args(argv)