A Hand tracking module
Project description
HT (Silicon Mac)
A package that allows to track the x, y, z locations of specific points from 0-20 in your hands.
Key Features • How To Use • Install •
Key Features
- Tracks your hand
- The hand connections or lines can be show or hidden
- Works for almost all computers
- Quick and not much lag
- Simple code that is easy to understand and customize if needed
How To Use
The following code gets the x, y locations of the index finger tip and moves the mouse accordingly
import htsilicon
import pyautogui
import cv2
screen_w, screen_h = pa.size()
cap = cv2.VideoCapture(0)
while 1:
tracker = htsilicon.handtrack.hand(cap=cap, vid_exit='q')
if tracker:
for id, landmarks in enumerate(tracker[0]):
x = int(landmarks.x * tracker[2])
y = int(landmarks.y * tracker[1])
if id == 8:
main_x = screen_w/tracker[2] * x
main_y = screen_h/tracker[1] * y
pyautogui.moveTo(main_x, main_y)
if tracker[4] == None:
break
Install
Install with pip
$ pip install htsilicon
License
MIT
http://advaith.athenaserv.com · GitHub @advaith-22 · Twitter @_Advaith_S
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
htsilicon-0.1.tar.gz
(3.5 kB
view hashes)