MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / findHands

Method findHands

computer-vision/hand_tracking.py:21–33  ·  view source on GitHub ↗
(self, img, draw=True)

Source from the content-addressed store, hash-verified

19 self.tipIds = [4, 8, 12, 16, 20]
20
21 def findHands(self, img, draw=True):
22 imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
23 self.results = self.hands.process(imgRGB)
24 # print(results.multi_hand_landmarks)
25
26 if self.results.multi_hand_landmarks:
27 for handLms in self.results.multi_hand_landmarks:
28 if draw:
29 self.mpDraw.draw_landmarks(
30 img, handLms, self.mpHands.HAND_CONNECTIONS
31 )
32
33 return img
34
35 def findPosition(self, img, handNo=0, draw=True):
36 xList = []

Callers 3

mainFunction · 0.95
virtual_mouse.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected