From 804fb4757a6e7e82ad6d2d363b05ee62a16bf400 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Fri, 11 Aug 2023 02:17:25 +0200 Subject: [PATCH] Folder restrucutre --- 42.png => assets/img/42.png | Bin {sfx => assets/sfx}/collect.mp3 | Bin {sfx => assets/sfx}/start.mp3 | Bin track_hand.py | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename 42.png => assets/img/42.png (100%) rename {sfx => assets/sfx}/collect.mp3 (100%) rename {sfx => assets/sfx}/start.mp3 (100%) diff --git a/42.png b/assets/img/42.png similarity index 100% rename from 42.png rename to assets/img/42.png diff --git a/sfx/collect.mp3 b/assets/sfx/collect.mp3 similarity index 100% rename from sfx/collect.mp3 rename to assets/sfx/collect.mp3 diff --git a/sfx/start.mp3 b/assets/sfx/start.mp3 similarity index 100% rename from sfx/start.mp3 rename to assets/sfx/start.mp3 diff --git a/track_hand.py b/track_hand.py index 8ba5566..573a0ad 100755 --- a/track_hand.py +++ b/track_hand.py @@ -69,7 +69,7 @@ mp_draw: ModuleType = mp.solutions.drawing_utils img42_side_len = 70 img42: np.ndarray = get_42_img( - "./42.png", + "./assets/img/42.png", margin_top = 100 + 20, margin_bottom = 100 + 20, margin_left = 100, @@ -146,10 +146,10 @@ def show_frame(frame: np.ndarray, to_stdout: bool=False) -> None: cv2.waitKey(1) def collect_sfx() -> None: - Popen(['paplay', './sfx/collect.mp3']) + Popen(['paplay', './assets/sfx/collect.mp3']) def main() -> NoReturn: - Popen(['paplay', './sfx/start.mp3']) + Popen(['paplay', './assets/sfx/start.mp3']) capture: VideoCapture = cv2.VideoCapture(0) hands = mp_hands.Hands(max_num_hands=2)