Phyton mit dem Framework "MediaPipe" Hand-Tracking Frage?

Hallo zusammen,

ich bin derzeit dabei mich mit dem framework mediapipe vertrau zu machen. Da habe ich ein Video auf YouTube angesehen (Link: https://www.youtube.com/watch?v=ipHKQVtwRas ). Dort wird halt gezeigt wie man halt den Framework als Hand Tracking implementiert. Ich habe fast alles verstanden, außer eine Zeile. Dort wird "height, width, _ = frame.shape" implementiert. Wieso ist in der mitte ein "_" und was soll das bedeuten? Hier nochmal das ganze Code:

import cv2
import mediapipe as mp

mp_drawing = mp.solutions.drawing_utils
mp_hands = mp.solutions.hands

cap = cv2.VideoCapture(0)

with mp_hands.Hands(
    static_image_mode = False,
    max_num_hands = 2,
    min_detection_confidence = 0.5) as hands:
    
    while True:
        ret, frame = cap.read()
        if ret == False:
            break

        height, width, _ = frame.shape
        frame = cv2.flip(frame,1)
        frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)

        results = hands.process(frame_rgb)

        if results.multi_hand_landmarks is not None:
            for hand_landmarks in results.multi_hand_landmarks:
                mp_drawing.draw_landmarks(
                    frame, hand_landmarks, mp_hands.HAND_CONNECTIONS)

        cv2.imshow("Frame", frame)
        if cv2.waitKey(1) & 0xFF == 27:
            break


cap.release()
cv2.destroyAllWindows()
programmieren, Python

Meistgelesene Beiträge zum Thema Python