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

Method __init__

computer-vision/hand_tracking.py:8–19  ·  view source on GitHub ↗
(self, mode=False, maxHands=2, detectionCon=0.5, trackCon=0.5)

Source from the content-addressed store, hash-verified

6
7class HandDetector:
8 def __init__(self, mode=False, maxHands=2, detectionCon=0.5, trackCon=0.5):
9 self.mode = mode
10 self.maxHands = maxHands
11 self.detectionCon = detectionCon
12 self.trackCon = trackCon
13
14 self.mpHands = mp.solutions.hands
15 self.hands = self.mpHands.Hands(
16 self.mode, self.maxHands, self.detectionCon, self.trackCon
17 )
18 self.mpDraw = mp.solutions.drawing_utils
19 self.tipIds = [4, 8, 12, 16, 20]
20
21 def findHands(self, img, draw=True):
22 imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected