Browse Source

Fixing small typo in mediapipe demo

tags/v0.3.12-rc0
haixuanTao haixuantao 9 months ago
parent
commit
04ce95714a
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      examples/mediapipe/realsense-dev.yml
  2. +1
    -1
      node-hub/dora-mediapipe/dora_mediapipe/main.py

+ 1
- 1
examples/mediapipe/realsense-dev.yml View File

@@ -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


+ 1
- 1
node-hub/dora-mediapipe/dora_mediapipe/main.py View File

@@ -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


Loading…
Cancel
Save