Sfoglia il codice sorgente

fix(KekkaiUtilize): Lower the image matching threshold #640

ryland 1 anno fa
parent
commit
c7317dd551

+ 3 - 3
dev_tools/assets_test.py

@@ -34,10 +34,10 @@ def detect_ocr(file: str, target: RuleOcr):
 
 
 # 图片文件路径 可以是相对路径
-IMAGE_FILE = r"C:\Users\萌萌哒\Desktop\QQ20250105-160854.png"
+IMAGE_FILE = r"C:\Users\Ryland\Desktop\401100578-df75cd36-6ae1-48f9-9605-58cde7c0fa00.png"
 if __name__ == '__main__':
-    from tasks.KittyShop.script_task import ScriptTask
-    targe = ScriptTask.I_MAIN_BUSY_2
+    from tasks.KekkaiUtilize.script_task import ScriptTask
+    targe = ScriptTask.I_SHI_GROWN
     print(detect_image(IMAGE_FILE, targe))
 
     # ocr demo

+ 1 - 1
tasks/KekkaiUtilize/assets.py

@@ -29,7 +29,7 @@ class KekkaiUtilizeAssets:
 
 	# Image Rule Assets
 	# 育成 
-	I_SHI_GROWN = RuleImage(roi_front=(595,291,35,38), roi_back=(530,254,181,198), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/realm/realm_shi_grown.png")
+	I_SHI_GROWN = RuleImage(roi_front=(595,291,35,38), roi_back=(530,254,181,198), threshold=0.7, method="Template matching", file="./tasks/KekkaiUtilize/realm/realm_shi_grown.png")
 	# 结界卡 
 	I_SHI_CARD = RuleImage(roi_front=(886,290,38,56), roi_back=(870,276,75,86), threshold=0.7, method="Template matching", file="./tasks/KekkaiUtilize/realm/realm_shi_card.png")
 	# description 

+ 1 - 1
tasks/KekkaiUtilize/realm/image.json

@@ -5,7 +5,7 @@
     "roiFront": "595,291,35,38",
     "roiBack": "530,254,181,198",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.7,
     "description": "育成"
   },
   {