feat: Enhance 福袋 template matching functionality
- Introduced a new configuration option to enable or disable 福袋 template matching, improving user control over the feature. - Updated command-line arguments to support enabling and disabling the 福袋 template matching feature. - Enhanced the GUI to include options for configuring 福袋 template matching settings. - Improved error handling and logging in various modules to support the new functionality. - Updated documentation to reflect changes in 福袋 template matching features and configuration options.
This commit is contained in:
1 parent
533943620c
commit
fe0098c591
18 files changed
+7263
-107
No files matched your search
+15
@@ -229,6 +229,16 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
|
||||
default=None,
|
||||
help="福袋模板匹配阈值(0.0-1.0,默认0.7)",
|
||||
)
|
||||
p.add_argument(
|
||||
"--fudai-template-enabled",
|
||||
action="store_true",
|
||||
help="启用福袋模板匹配(默认关闭)",
|
||||
)
|
||||
p.add_argument(
|
||||
"--fudai-template-disabled",
|
||||
action="store_true",
|
||||
help="禁用福袋模板匹配(默认已禁用)",
|
||||
)
|
||||
|
||||
return p.parse_args(argv)
|
||||
|
||||
@@ -410,6 +420,11 @@ def main(argv: list[str]) -> int:
|
||||
setattr(analyser, "enable_ocr_mode1", True)
|
||||
if getattr(args, "disable_ocr_mode1", False):
|
||||
setattr(analyser, "enable_ocr_mode1", False)
|
||||
# 福袋模板匹配开关(命令行优先)
|
||||
if getattr(args, "fudai_template_enabled", False):
|
||||
setattr(analyser, "fudai_template_match_enabled", True)
|
||||
if getattr(args, "fudai_template_disabled", False):
|
||||
setattr(analyser, "fudai_template_match_enabled", False)
|
||||
# 福袋模板匹配阈值(命令行优先)
|
||||
if getattr(args, "fudai_template_threshold", None) is not None:
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user