From 04ce95714a783d55185fbbb8b6308f7e12075d16 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Sun, 27 Apr 2025 11:53:12 +0200 Subject: [PATCH] Fixing small typo in mediapipe demo --- examples/mediapipe/realsense-dev.yml | 2 +- node-hub/dora-mediapipe/dora_mediapipe/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mediapipe/realsense-dev.yml b/examples/mediapipe/realsense-dev.yml index 6822ffca..a2b612ee 100755 --- a/examples/mediapipe/realsense-dev.yml +++ b/examples/mediapipe/realsense-dev.yml @@ -18,7 +18,7 @@ nodes: - points3d - id: plot - build: pip install dora-rerun + build: pip install -e ../../node-hub/dora-rerun path: dora-rerun inputs: realsense/image: camera/image diff --git a/node-hub/dora-mediapipe/dora_mediapipe/main.py b/node-hub/dora-mediapipe/dora_mediapipe/main.py index 079fb4d2..6a9ceedb 100644 --- a/node-hub/dora-mediapipe/dora_mediapipe/main.py +++ b/node-hub/dora-mediapipe/dora_mediapipe/main.py @@ -15,7 +15,7 @@ mp_draw = mp.solutions.drawing_utils def get_3d_coordinates(landmark, depth_frame, w, h, resolution, focal_length): cx, cy = int(landmark.x * w), int(landmark.y * h) if 0 < cx < w and 0 < cy < h: - depth = depth_frame[cx, cy] / 1_000.0 + depth = depth_frame[cy, cx] / 1_000.0 if depth > 0: fx, fy = focal_length ppx, ppy = resolution