i write a script for search a hand and draw it on screen, but i have an error
AttributeError: 'numpy.ndarray' object has no attribute 'multi_hand_landmarks'
idk how to solve it. FULL CODE
import cv2
import mediapipe as mp
cap = cv2.VideoCapture(2)
hands = mp.solutions.hands
draw = mp.solutions.drawing_utils
while True:
#Закрытие окна
if cv2.waitKey(1) & 0xFF == 27:
break
success, image = cap.read()
image = cv2.flip(image, 1)
results =image
for handLms in results.multi_hand_landmarks:
for id, lm in enumerate(handLms.landmarks):
h, w, c = image.shape
cx, cy = int(lm.x * w), int(lm.y * h)
draw.draw_landmarks(image, handLms, mp.solutions.hands.HAND_CONNECTIONS)
cv2.imshow("Hand", image)
I search in ALL sites, but i dont have a solve. Thanks.