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