title: Mediapipe Hands landmark extraction
body: <p>My goal is to extract the hand landmarks from media pipe for each hand to train an LSTM network with and to recognize different actions.</p>
  <p>With the Holistic solution, this is quite easy, since all landmarks of the left or right hand can be retrieved via the respective function.</p>
  <pre><code>def extract_keypoints(results):
      lh = np.array([[res.x, res.y, res.z] for res in results.left_hand_landmarks.landmark]).flatten() if results.left_hand_landmarks else np.zeros(21*3)
      rh = np.array([[res.x, res.y, res.z] for res in results.right_hand_landmarks.landmark]).flatten() if results.right_hand_landmarks else np.zeros(21*3)
      return np.concatenate([ lh, rh])
  </code></pre>
  <p>However, I get problems with hand detection when shooting from egoperspective and the holistic solution. So I have to switch to the mediapipe hands solution.
  With mediapipe hands there is only the function MULTI_HAND_LANDMARKS, which only gives me the landmarks of one hand.</p>
  <pre><code>if results.multi_hand_landmarks:
              print(results.multi_handedness)
              for hand_landmarks in results.multi_hand_landmarks:
                  print('hand_landmarks:', hand_landmarks)
              for hand_landmarks in results.multi_hand_landmarks:
                  mp_drawing.draw_landmarks(image,hand_landmarks,mp_hands.HAND_CONNECTIONS,mp_drawing_styles.get_default_hand_landmarks_style(),mp_drawing_styles.get_default_hand_connections_style())
  </code></pre>
  <p>As a result I get something like this, only 20 more times for the total of 21 landmarks per hand.</p>
  <p><code>hand_landmarks: landmark { x: 0.8579444885253906 y: 0.904037356376648 z: 2.08246397903622e-09 }</code></p>
  <p>Does the handlandmark output always alternate between one hand and the other if there are two hands in the picture?</p>