Răsfoiți Sursa

feat: 通过图片灰化识别鏖刀禁府不同时间的皮肤

chubbycat 1 an în urmă
părinte
comite
550853ecc9

+ 3 - 3
tasks/Component/Costume/assets.py

@@ -38,15 +38,15 @@ class CostumeAssets:
 
 
 	# Image Rule Assets
 	# Image Rule Assets
 	# description 
 	# description 
-	I_CHECK_MAIN_11 = RuleImage(roi_front=(680,128,83,33), roi_back=(149,109,1099,100), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main11/main11_check_main_11.png")
+	I_CHECK_MAIN_11 = RuleImage(roi_front=(521,570,53,24), roi_back=(131,514,1099,100), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main11/main11_check_main_11.png")
 	# description 
 	# description 
 	I_MAIN_GOTO_EXPLORATION_11 = RuleImage(roi_front=(522,113,21,34), roi_back=(192,105,904,66), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_exploration_11.png")
 	I_MAIN_GOTO_EXPLORATION_11 = RuleImage(roi_front=(522,113,21,34), roi_back=(192,105,904,66), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_exploration_11.png")
 	#  
 	#  
 	I_MAIN_GOTO_SUMMON_11 = RuleImage(roi_front=(946,111,20,37), roi_back=(500,102,623,68), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_summon_11.png")
 	I_MAIN_GOTO_SUMMON_11 = RuleImage(roi_front=(946,111,20,37), roi_back=(500,102,623,68), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_summon_11.png")
 	# 町中 
 	# 町中 
-	I_MAIN_GOTO_TOWN_11 = RuleImage(roi_front=(701,164,36,20), roi_back=(262,145,999,78), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_town_11.png")
+	I_MAIN_GOTO_TOWN_11 = RuleImage(roi_front=(703,169,35,20), roi_back=(262,145,999,78), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_town_11.png")
 	# 宠物室 
 	# 宠物室 
-	I_PET_HOUSE_11 = RuleImage(roi_front=(946,335,40,35), roi_back=(729,323,440,69), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main11/main11_pet_house_11.png")
+	I_PET_HOUSE_11 = RuleImage(roi_front=(966,323,29,29), roi_back=(724,295,440,69), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main11/main11_pet_house_11.png")
 
 
 
 
 	# Image Rule Assets
 	# Image Rule Assets

+ 3 - 3
tasks/Component/Costume/costume_test.py

@@ -15,12 +15,12 @@ from module.logger import logger
 class ScriptTask(GeneralBattle, GameUi, SwitchSoul, PetsAssets, ):
 class ScriptTask(GeneralBattle, GameUi, SwitchSoul, PetsAssets, ):
 
 
     def run(self):
     def run(self):
-        # 探索测试
-        self.ui_click(self.I_MAIN_GOTO_EXPLORATION, self.I_CHECK_EXPLORATION)
-        self.ui_click(self.I_UI_BACK_BLUE, self.I_CHECK_MAIN)
         # 町中测试
         # 町中测试
         self.ui_click(self.I_MAIN_GOTO_TOWN, self.I_CHECK_TOWN)
         self.ui_click(self.I_MAIN_GOTO_TOWN, self.I_CHECK_TOWN)
         self.ui_click(self.I_TOWN_GOTO_MAIN, self.I_CHECK_MAIN)
         self.ui_click(self.I_TOWN_GOTO_MAIN, self.I_CHECK_MAIN)
+        # 探索测试
+        self.ui_click(self.I_MAIN_GOTO_EXPLORATION, self.I_CHECK_EXPLORATION)
+        self.ui_click(self.I_UI_BACK_BLUE, self.I_CHECK_MAIN)
         # 召唤测试
         # 召唤测试
         self.ui_click(self.I_MAIN_GOTO_SUMMON, self.I_CHECK_SUMMON)
         self.ui_click(self.I_MAIN_GOTO_SUMMON, self.I_CHECK_SUMMON)
         self.ui_click(self.I_SUMMON_GOTO_MAIN, self.I_CHECK_MAIN)
         self.ui_click(self.I_SUMMON_GOTO_MAIN, self.I_CHECK_MAIN)

+ 5 - 5
tasks/Component/Costume/main11/image.json

@@ -2,8 +2,8 @@
   {
   {
     "itemName": "check_main_11",
     "itemName": "check_main_11",
     "imageName": "main11_check_main_11.png",
     "imageName": "main11_check_main_11.png",
-    "roiFront": "680,128,83,33",
-    "roiBack": "149,109,1099,100",
+    "roiFront": "521,570,53,24",
+    "roiBack": "131,514,1099,100",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -29,7 +29,7 @@
   {
   {
     "itemName": "main_goto_town_11",
     "itemName": "main_goto_town_11",
     "imageName": "main11_main_goto_town_11.png",
     "imageName": "main11_main_goto_town_11.png",
-    "roiFront": "701,164,36,20",
+    "roiFront": "703,169,35,20",
     "roiBack": "262,145,999,78",
     "roiBack": "262,145,999,78",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.7,
     "threshold": 0.7,
@@ -38,8 +38,8 @@
   {
   {
     "itemName": "pet_house_11",
     "itemName": "pet_house_11",
     "imageName": "main11_pet_house_11.png",
     "imageName": "main11_pet_house_11.png",
-    "roiFront": "946,335,40,35",
-    "roiBack": "729,323,440,69",
+    "roiFront": "966,323,29,29",
+    "roiBack": "724,295,440,69",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "宠物室"
     "description": "宠物室"

BIN
tasks/Component/Costume/main11/main11_check_main_11.png


BIN
tasks/Component/Costume/main11/main11_main_goto_exploration_11.png


BIN
tasks/Component/Costume/main11/main11_main_goto_summon_11.png


BIN
tasks/Component/Costume/main11/main11_main_goto_town_11.png


BIN
tasks/Component/Costume/main11/main11_pet_house_11.png