Przeglądaj źródła

fix(TalismanPass): Update the entry image

ryland 2 lat temu
rodzic
commit
cfa6bb3ea2

+ 5 - 5
dev_tools/assets_test.py

@@ -27,20 +27,20 @@ def detect_image(file: str, targe: RuleImage) -> bool:
     logger.info(f'[{targe.name}]: {result}')
     logger.info(f'[{targe.name}]: {result}')
     return result
     return result
 
 
+
 def detect_ocr(file: str, target: RuleOcr):
 def detect_ocr(file: str, target: RuleOcr):
     img = load_image(file)
     img = load_image(file)
     return target.ocr(img)
     return target.ocr(img)
 
 
 
 
-
 # 图片文件路径 可以是相对路径
 # 图片文件路径 可以是相对路径
-IMAGE_FILE = './log/error/1710141221597/2024-03-11_15-13-41-589447.png'
+IMAGE_FILE = r'C:\Users\Ryland\Downloads\QQ截图20240402214513.png'
 if __name__ == '__main__':
 if __name__ == '__main__':
     from tasks.KekkaiActivation.assets import KekkaiActivationAssets
     from tasks.KekkaiActivation.assets import KekkaiActivationAssets
-    targe = KekkaiActivationAssets.I_CARDS_FISH_3
+    from tasks.GameUi.assets import GameUiAssets
+
+    targe = GameUiAssets.I_MAIN_GOTO_DAILY
     print(detect_image(IMAGE_FILE, targe))
     print(detect_image(IMAGE_FILE, targe))
     # from tasks.KekkaiActivation.assets import KekkaiActivationAssets
     # from tasks.KekkaiActivation.assets import KekkaiActivationAssets
     # target = KekkaiActivationAssets.O_CARD_ALL_TIME
     # target = KekkaiActivationAssets.O_CARD_ALL_TIME
     # print(detect_ocr(IMAGE_FILE, target))
     # print(detect_ocr(IMAGE_FILE, target))
-
-

+ 2 - 2
tasks/GameUi/assets.py

@@ -126,8 +126,8 @@ class GameUiAssets:
 	I_MAIN_GOTO_ONMYODO = RuleImage(roi_front=(992,614,51,60), roi_back=(992,614,51,60), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_onmyodo.png")
 	I_MAIN_GOTO_ONMYODO = RuleImage(roi_front=(992,614,51,60), roi_back=(992,614,51,60), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_onmyodo.png")
 	# description 
 	# description 
 	I_MAIN_GOTO_FRIENDS = RuleImage(roi_front=(879,623,55,55), roi_back=(867,606,79,77), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_friends.png")
 	I_MAIN_GOTO_FRIENDS = RuleImage(roi_front=(879,623,55,55), roi_back=(867,606,79,77), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_friends.png")
-	# description 
-	I_MAIN_GOTO_DAILY = RuleImage(roi_front=(778,612,52,54), roi_back=(759,595,84,84), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_main_goto_daily.png")
+	# 进入花合战 
+	I_MAIN_GOTO_DAILY = RuleImage(roi_front=(779,612,51,67), roi_back=(754,595,89,97), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_main_goto_daily.png")
 	# description 
 	# description 
 	I_MAIN_GOTO_MALL = RuleImage(roi_front=(663,661,41,22), roi_back=(644,613,81,78), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_main_goto_mall.png")
 	I_MAIN_GOTO_MALL = RuleImage(roi_front=(663,661,41,22), roi_back=(644,613,81,78), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_main_goto_mall.png")
 	# description 
 	# description 

+ 3 - 3
tasks/GameUi/page/page_img_3.json

@@ -29,11 +29,11 @@
   {
   {
     "itemName": "main_goto_daily",
     "itemName": "main_goto_daily",
     "imageName": "page_main_goto_daily.png",
     "imageName": "page_main_goto_daily.png",
-    "roiFront": "778,612,52,54",
-    "roiBack": "759,595,84,84",
+    "roiFront": "779,612,51,67",
+    "roiBack": "754,595,89,97",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.7,
     "threshold": 0.7,
-    "description": "description"
+    "description": "进入花合战"
   },
   },
   {
   {
     "itemName": "main_goto_mall",
     "itemName": "main_goto_mall",

BIN
tasks/GameUi/page/page_main_goto_daily.png