You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
912 B
Python
43 lines
912 B
Python
|
|
from mediapipe.python.solutions import drawing_utils
|
|
|
|
|
|
|
|
|
|
|
|
def analysis_mediapipe(images,hands,parameter):
|
|
|
|
results = hands.process(images)
|
|
|
|
re_list = []
|
|
|
|
if results.multi_hand_landmarks:
|
|
for hand_landmarks in results.multi_hand_landmarks:
|
|
# print(hand_landmarks)
|
|
point_list = drawing_utils.draw_landmarks(
|
|
images, hand_landmarks, parameter)
|
|
|
|
re_list.append(point_list)
|
|
|
|
# print(re_list)
|
|
|
|
return re_list
|
|
|
|
# if __name__ == '__main__':
|
|
|
|
# mp_drawing = drawing_utils
|
|
# mp_hands = hands
|
|
# frame = cv2.imread("E:/BANK_XZ/data_file/4654613.png")
|
|
# parameter = mp_hands.HAND_CONNECTIONS
|
|
|
|
# hands = mp_hands.Hands(
|
|
# static_image_mode=True,
|
|
# max_num_hands=4,
|
|
# min_detection_confidence=0.1,
|
|
# min_tracking_confidence=0.1)
|
|
|
|
# analysis_mediapipe(frame,hands)
|
|
|
|
|
|
|