This commit is contained in:
Tulis
2025-09-10 19:51:05 +02:00
parent 5560f6b2e6
commit 5ab222aee3
4 changed files with 154 additions and 208 deletions

View File

@ -10,6 +10,10 @@ def recvall(sock, n):
data += packet
return data
def find_closest(target):
global moves
return min(moves, key=lambda t: abs(t[0] - target))
def resize_with_padding(image, target_size=(640, 640)):
h, w = image.shape[:2]
target_w, target_h = target_size