Refactoring

This commit is contained in:
Lukas Wölfer
2020-07-05 13:42:14 +02:00
parent 1f086a515c
commit a9ca38e812
8 changed files with 59 additions and 100 deletions

View File

@@ -32,7 +32,6 @@ def get_field_squares(
def catalogue_cards(squares: List[np.ndarray]) -> List[Tuple[np.ndarray, Card]]:
"""Run manual cataloging for given squares"""
cv2.namedWindow("Catalogue", cv2.WINDOW_NORMAL)
cv2.waitKey(1)
result: List[Tuple[np.ndarray, Card]] = []
print("Card ID is [B]ai, [Z]hong, [F]a, [H]ua, [R]ed, [G]reen, [B]lack")
print("Numbercard e.g. R3")
@@ -51,7 +50,7 @@ def catalogue_cards(squares: List[np.ndarray]) -> List[Tuple[np.ndarray, Card]]:
for square in squares:
while True:
cv2.imshow("Catalogue", cv2.resize(square, (500, 500)))
cv2.waitKey(1)
cv2.waitKey(100)
card_id = input("Card ID:").lower()
card_type: Optional[Card] = None
if len(card_id) == 1: