(self, mode=False, maxHands=2, detectionCon=0.5, trackCon=0.5)
| 6 | |
| 7 | class 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) |
nothing calls this directly
no outgoing calls
no test coverage detected