semvec/pypi-packages huggingface dataset:
handtpy 1.5
Hand Tracking module that is fast and easy to use
Keywords: python,video,hand,tracking,computer vision ai



<h1 align="center">
  <br>
  <img src="https://github.com/advaith-22/assets/blob/main/image-removebg-preview.png?raw=true" alt="Markdownify" width="200"></a>
  <br>
  HandT.py
  <br>
</h1>

<h4 align="center">A package that allows to track the x, y, z locations of specific points from 0-20 in your hands.</h4>

<hr>

<p align="center">
  <a href="#key-features">Key Features</a> •
  <a href="#how-to-use">How To Use</a> •
  <a href="#Install">Install</a> •
</p>

![screenshot](https://github.com/advaith-22/assets/blob/main/Modern%20Gaming%20Cover%20YouTube%20Channel%20Art.png?raw=true)

## 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

```python
import handtpy
import pyautogui
import cv2

screen_w, screen_h = pa.size()
cap = cv2.VideoCapture(0)
while 1:
    tracker = htpy.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

```bash
$ pip install handtpy
```

## License

MIT

---

> [http://advaith.athenaserv.com](http://advaith.athenaserv.com) &nbsp;&middot;&nbsp;
> GitHub [@advaith-22](https://github.com/advaith-22) &nbsp;&middot;&nbsp;
> Twitter [@_Advaith_S](https://twitter.com/_Advaith_S)