Pārlūkot izejas kodu

fix(Assets): #931 Expand the iou of the image

huangrunheng 1 gadu atpakaļ
vecāks
revīzija
ac247e54b8

+ 3 - 3
dev_tools/assets_test.py

@@ -34,10 +34,10 @@ def detect_ocr(file: str, target: RuleOcr):
 
 
 # 图片文件路径 可以是相对路径
-IMAGE_FILE = r"C:\Users\萌萌哒\Desktop\424368633-6b29ec7d-8f68-4cfc-a52f-c671bb159999.png"
+IMAGE_FILE = r"C:\Users\萌萌哒\Desktop\465610922-c9f6f975-0159-4e24-a569-88aa3e862d70.png"
 if __name__ == '__main__':
-    from tasks.RyouToppa.script_task import ScriptTask
-    targe = ScriptTask.I_PREPARE_HIGHLIGHT
+    from tasks.Exploration.script_task import ScriptTask
+    targe = ScriptTask.I_CLOUD
     print(detect_image(IMAGE_FILE, targe))
 
     # ocr demo

+ 1 - 1
tasks/Component/GeneralBuff/assets.py

@@ -30,7 +30,7 @@ class GeneralBuffAssets:
 	# description 
 	I_CLOSE_RED = RuleImage(roi_front=(774,143,21,21), roi_back=(764,134,38,369), threshold=0.63, method="Template matching", file="./tasks/Component/GeneralBuff/gb/gb_close_red.png")
 	# 用来判定是否点击的那个 
-	I_CLOUD = RuleImage(roi_front=(356,505,65,38), roi_back=(356,505,65,38), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBuff/gb/gb_cloud.png")
+	I_CLOUD = RuleImage(roi_front=(357,505,65,38), roi_back=(313,484,158,75), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBuff/gb/gb_cloud.png")
 
 
 	# Ocr Rule Assets

+ 2 - 2
tasks/Component/GeneralBuff/gb/image.json

@@ -83,8 +83,8 @@
   {
     "itemName": "cloud",
     "imageName": "gb_cloud.png",
-    "roiFront": "356,505,65,38",
-    "roiBack": "356,505,65,38",
+    "roiFront": "357,505,65,38",
+    "roiBack": "313,484,158,75",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "用来判定是否点击的那个"

+ 1 - 1
tasks/Exploration/assets.py

@@ -90,7 +90,7 @@ class ExplorationAssets:
 	# 已候补出战的狗粮 
 	I_E_RATATE_EXSIT = RuleImage(roi_front=(108,580,995,32), roi_back=(108,580,995,32), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_ratate_exsit.png")
 	# 确定按钮 
-	I_E_SURE_BUTTON = RuleImage(roi_front=(1135,426,43,37), roi_back=(1135,426,43,37), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_sure_button.png")
+	I_E_SURE_BUTTON = RuleImage(roi_front=(1131,425,43,37), roi_back=(1077,367,165,152), threshold=0.65, method="Template matching", file="./tasks/Exploration/res/res_e_sure_button.png")
 	# 设置按钮 
 	I_E_SETTINGS_BUTTON = RuleImage(roi_front=(37,692,53,26), roi_back=(37,692,53,26), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_settings_button.png")
 	# 普通怪 

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

@@ -83,10 +83,10 @@
   {
     "itemName": "e_sure_button",
     "imageName": "res_e_sure_button.png",
-    "roiFront": "1135,426,43,37",
-    "roiBack": "1135,426,43,37",
+    "roiFront": "1131,425,43,37",
+    "roiBack": "1077,367,165,152",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.65,
     "description": "确定按钮"
   },
   {