update litris with board detection
This commit is contained in:
@@ -29,7 +29,7 @@ class NewStoneID(threading.Thread):
|
||||
self.data_coordinates = np.zeros((20, 20), dtype=object)
|
||||
self.fill_data_coordinates()
|
||||
|
||||
self.needles = {1: cv.imread("litris/blue_needle.jpg", cv.IMREAD_UNCHANGED)}
|
||||
self.needles = {'Q': cv.imread("litris/blue_needle.jpg", cv.IMREAD_UNCHANGED)}
|
||||
|
||||
self.run_mode = 'run'
|
||||
self.actual_letter = ""
|
||||
@@ -76,7 +76,7 @@ class NewStoneID(threading.Thread):
|
||||
screenshot = self.capture_window.get_screenshot()
|
||||
screenshot = screenshot[580:845, 1148:1412]
|
||||
|
||||
rectangles = self.vision_stun.find(screenshot, self.needles[1], 0.85, 16)
|
||||
rectangles = self.vision_stun.find(screenshot, self.needles['Q'], 0.85, 16)
|
||||
if len(rectangles) == 0:
|
||||
return None
|
||||
|
||||
@@ -158,7 +158,7 @@ class NewStoneID(threading.Thread):
|
||||
for point in points:
|
||||
x, y = self.point_in_rect(point)
|
||||
if x is not None and y is not None:
|
||||
data_coords[x][y] = int(needle_key)
|
||||
data_coords[x][y] = needle_key
|
||||
#self.change_value(x, y, int(needle_key))
|
||||
# print(field.data_value_grid)
|
||||
# cv.circle(screenshot, points[0], 7, (0, 255, 0), -1)
|
||||
|
||||
Reference in New Issue
Block a user