mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Fix: subtract_blur images are never used
This commit is contained in:
parent
e1468db85d
commit
02fab99431
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user