Pārlūkot izejas kodu

fix(Exploration): Update image threshold

ryland 1 gadu atpakaļ
vecāks
revīzija
5f3b6630cb

+ 3 - 3
dev_tools/assets_test.py

@@ -34,10 +34,10 @@ def detect_ocr(file: str, target: RuleOcr):
 
 
 # 图片文件路径 可以是相对路径
-IMAGE_FILE = r"C:\Users\Ryland\Desktop\Weixin Screenshot_20241209212253.png"
+IMAGE_FILE = r"D:\Project\OnmyojiAutoScript\log\error\1734235242044\2024-12-15_12-00-42-005384.png"
 if __name__ == '__main__':
-    from tasks.Restart.assets import RestartAssets
-    targe = RestartAssets.I_HARVEST_MAIL_COPY
+    from tasks.Exploration.assets import ExplorationAssets
+    targe = ExplorationAssets.I_BATTLE_REWARD
     print(detect_image(IMAGE_FILE, targe))
 
     # ocr demo

+ 1 - 1
tasks/Exploration/assets.py

@@ -98,7 +98,7 @@ class ExplorationAssets:
 	# boss 
 	I_BOSS_BATTLE_BUTTON = RuleImage(roi_front=(683,256,38,34), roi_back=(0,0,1276,719), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_boss_battle_button.png")
 	# 战后奖励 
-	I_BATTLE_REWARD = RuleImage(roi_front=(647,395,31,21), roi_back=(1,1,1278,718), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_battle_reward.png")
+	I_BATTLE_REWARD = RuleImage(roi_front=(647,395,31,21), roi_back=(1,1,1278,718), threshold=0.9, method="Template matching", file="./tasks/Exploration/res/res_battle_reward.png")
 	# 妖 
 	I_EXPLORATION_TITLE = RuleImage(roi_front=(1133,124,47,43), roi_back=(1133,124,47,43), threshold=0.7, method="Template matching", file="./tasks/Exploration/res/res_exploration_title.png")
 	# description 

+ 1 - 1
tasks/Exploration/res/image.json

@@ -122,7 +122,7 @@
     "roiFront": "647,395,31,21",
     "roiBack": "1,1,1278,718",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.9,
     "description": "战后奖励"
   },
   {