Skip to content

Commit

Permalink
Merge pull request #20 from baadjis/baadjis_branch
Browse files Browse the repository at this point in the history
update HandDetector
  • Loading branch information
cvzone committed Nov 12, 2021
2 parents 7582714 + ba804a1 commit dd5123c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cvzone/HandTrackingModule.py
Expand Up @@ -17,7 +17,7 @@ class HandDetector:
provides bounding box info of the hand found.
"""

def __init__(self, mode=False, maxHands=2, detectionCon=0.5, minTrackCon=0.5):
def __init__(self, mode=False,maxHands=2, detectionCon=0.5, minTrackCon=0.5):
"""
:param mode: In static mode, detection is done on each image: slower
:param maxHands: Maximum number of hands to detect
Expand All @@ -30,8 +30,8 @@ def __init__(self, mode=False, maxHands=2, detectionCon=0.5, minTrackCon=0.5):
self.minTrackCon = minTrackCon

self.mpHands = mp.solutions.hands
self.hands = self.mpHands.Hands(self.mode, self.maxHands,
self.detectionCon, self.minTrackCon)
self.hands = self.mpHands.Hands(static_image_mode=self.mode, max_num_hands=self.maxHands,
min_detection_confidence=self.detectionCon, min_tracking_confidence = self.minTrackCon)
self.mpDraw = mp.solutions.drawing_utils
self.tipIds = [4, 8, 12, 16, 20]
self.fingers = []
Expand Down
14 changes: 14 additions & 0 deletions requirements.txt
@@ -0,0 +1,14 @@
absl-py==0.15.0
attrs==21.2.0
cycler==0.11.0
kiwisolver==1.3.2
matplotlib==3.4.3
mediapipe==0.8.8.1
numpy==1.21.3
opencv-contrib-python==4.5.4.58
opencv-python==4.5.4.58
Pillow==8.4.0
protobuf==3.19.1
pyparsing==3.0.4
python-dateutil==2.8.2
six==1.16.0

0 comments on commit dd5123c

Please sign in to comment.