diff --git a/tasks/map/interact/aim.py b/tasks/map/interact/aim.py index bebbd7fee..0d5e41d10 100644 --- a/tasks/map/interact/aim.py +++ b/tasks/map/interact/aim.py @@ -187,7 +187,7 @@ class Aim: draw_circle(draw, self.circle_enemy, points) if self.debug: self.draw_enemy = cv2.multiply(draw, 4) - subtract_blur(draw, 3) + draw = subtract_blur(draw, 3) # Find peaks points = inrange(draw, lower=36) @@ -230,7 +230,6 @@ class Aim: draw_circle(draw, self.circle_item, points) if self.debug: self.draw_item = cv2.multiply(draw, 2) - subtract_blur(draw, 7) # Find peaks points = inrange(draw, lower=64) diff --git a/tasks/map/minimap/minimap.py b/tasks/map/minimap/minimap.py index e686fc0a0..b0744ec36 100644 --- a/tasks/map/minimap/minimap.py +++ b/tasks/map/minimap/minimap.py @@ -224,7 +224,7 @@ class Minimap(MapResource): scale = self.DIRECTION_ROTATION_SCALE * self.DIRECTION_SEARCH_SCALE mapping = cv2.resize(image, None, fx=scale, fy=scale, interpolation=cv2.INTER_NEAREST) result = cv2.matchTemplate(self.ArrowRotateMap, mapping, cv2.TM_CCOEFF_NORMED) - subtract_blur(result, 5) + result = subtract_blur(result, 5) _, sim, _, loca = cv2.minMaxLoc(result) loca = np.array(loca) / self.DIRECTION_SEARCH_SCALE // (self.DIRECTION_RADIUS * 2) degree = int((loca[0] + loca[1] * 8) * 5) @@ -241,7 +241,7 @@ class Minimap(MapResource): precise_map = self.ArrowRotateMapAll[row[0]:row[1], :] result = cv2.matchTemplate(precise_map, mapping, cv2.TM_CCOEFF_NORMED) - subtract_blur(result, 5) + result = subtract_blur(result, 5) def to_map(x): return int((x * self.DIRECTION_RADIUS * 2) * self.POSITION_SEARCH_SCALE)