1

I already print the results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_WRIST].z but I am not sure what this number represents and how I can transform this to meters. Can someone help me?

Here is part of my code to retrieve z coordinate of the left wrist:

    if results.pose_world_landmarks:
        avg[i] = results.pose_world_landmarks.landmark[mp_pose.PoseLandmark.LEFT_WRIST].z 
        i += 1
        if i == avgerageWindow-1:
            i = 0
            # print('z coordination left wrist' )    
            print(avg.mean())
                
            avg = np.zeros(avgerageWindow)

part of output:

-0.3987021893262863
-0.557043993473053
-0.5094283401966095
-0.5732827246189117
-0.5142240881919861
-0.624730509519577
-0.531936788931489
-0.7728394329547882
-0.9255167961120605
Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Amy de Lange
  • 21
  • 1
  • 2
  • *in meters* you say? do you have _one single camera_? then what you ask is **impossible**. cameras project. that means they remove a degree of freedom. to throw a flat image back into the 3D world, you'd get at least one degree of freedom back, and you can't recover that from the image. – Christoph Rackwitz May 10 '22 at 16:38

1 Answers1

0

POSE_WORLD_LANDMARKS...I think is what you want!

It gives you real-world 3D coordinates in meters with the origin at the center between hips.

(see https://google.github.io/mediapipe/solutions/pose.html#pose_world_landmarks)

mat b
  • 1
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 19 '22 at 04:16