2 Комити 83be77c1b5 ... a39aaa2021

Аутор SHA1 Порука Датум
  Richard Köhl a39aaa2021 rename image пре 1 година
  Richard Köhl caee9d452e add screenshot tool пре 1 година
3 измењених фајлова са 18 додато и 1 уклоњено
  1. 1 1
      dungeon.py
  2. 17 0
      extract.py
  3. 0 0
      templates/dungeon/to_battle.png

+ 1 - 1
dungeon.py

@@ -11,7 +11,7 @@ from helper import (
 
 # templates
 templates = {
-    "to_battle": cv2.imread("templates/dungeon/to_battle2.png"),
+    "to_battle": cv2.imread("templates/dungeon/to_battle.png"),
     "attack": cv2.imread("templates/dungeon/attack.png"),
     "auto_battle": cv2.imread("templates/dungeon/auto_battle.png"),
     "ok": cv2.imread("templates/dungeon/ok.png"),

+ 17 - 0
extract.py

@@ -0,0 +1,17 @@
+import cv2
+
+file_path = "test/20240112_132814.jpg"
+
+topLeftX = 1029
+topLeftY = 480
+bottomRightX = 1252
+bottomRightY = 734
+
+image = cv2.imread(file_path)
+cropped = image  # [topLeftY:bottomRightY, topLeftX:bottomRightX]
+
+# cv2.imwrite("templates/dungeon/angus.png", cropped)
+
+cv2.imshow("preview", cropped)
+cv2.waitKey(0)
+cv2.destroyAllWindows()

+ 0 - 0
templates/dungeon/to_battle2.png → templates/dungeon/to_battle.png