Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update HandDetector #20

Merged
merged 2 commits into from Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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