ソースを参照

fix(GeneralBattle): Fix image offset #776

huangrunheng 1 年間 前
親
コミット
1b95524425

+ 3 - 3
dev_tools/assets_test.py

@@ -34,10 +34,10 @@ def detect_ocr(file: str, target: RuleOcr):
 
 
 # 图片文件路径 可以是相对路径
-IMAGE_FILE = r"C:\Users\Neptine\Desktop\404528170-67ec447a-cc2c-4c62-b253-51e383f6a863.png"
+IMAGE_FILE = r"C:\Users\萌萌哒\Desktop\424368633-6b29ec7d-8f68-4cfc-a52f-c671bb159999.png"
 if __name__ == '__main__':
-    from tasks.SoulsTidy.script_task import ScriptTask
-    targe = ScriptTask.I_UI_CONFIRM
+    from tasks.RyouToppa.script_task import ScriptTask
+    targe = ScriptTask.I_PREPARE_HIGHLIGHT
     print(detect_image(IMAGE_FILE, targe))
 
     # ocr demo

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

@@ -72,7 +72,7 @@ class GeneralBattleAssets:
 	# 预设的小图标 
 	I_PRESET = RuleImage(roi_front=(32,650,47,45), roi_back=(32,650,47,45), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_preset.png")
 	# 准备 
-	I_PREPARE_HIGHLIGHT = RuleImage(roi_front=(1128,536,100,100), roi_back=(1128,536,100,100), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_prepare_highlight.png")
+	I_PREPARE_HIGHLIGHT = RuleImage(roi_front=(1128,536,100,100), roi_back=(1110,500,169,200), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_prepare_highlight.png")
 	# 战斗胜利 
 	I_WIN = RuleImage(roi_front=(385,47,100,100), roi_back=(296,33,414,224), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_win.png")
 	# 准备但是界面还未加载这个时候是黑色的 

+ 1 - 1
tasks/Component/GeneralBattle/gb/image.json

@@ -21,7 +21,7 @@
     "itemName": "prepare_highlight",
     "imageName": "gb_prepare_highlight.png",
     "roiFront": "1128,536,100,100",
-    "roiBack": "1128,536,100,100",
+    "roiBack": "1110,500,169,200",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "准备"