Skip to content

infiniai-tech/hand-tracking-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hand-tracking-ml

Module to help track hand with Computer Vision

Hand Tracking


from infiniai.HandTrackingModule import handDetector
import cv2
import time
import infiniai.HandTrackingModule as htm

pTime = 0
cTime = 0
cap = cv2.VideoCapture(0)
detector = handDetector()
while True:
    success, img = cap.read()
    img = detector.findHands(img)
    PosList = detector.findPosition(img)
    if len(PosList) != 0:
        print(PosList[4])

    cTime = time.time()
    fps = 1 / (cTime - pTime)
    pTime = cTime

    cv2.putText(img, str(int(fps)), (10, 70), cv2.FONT_HERSHEY_DUPLEX, 3, (255, 0, 0), 3)

    cv2.imshow("Webcam", img)
    cv2.waitKey(1)
cap.release()
cv2.destroyAllWindows()

About

Module to help track hand with Computer Vision

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages