This Python script allows you to play/pause media using hand gestures detected via a webcam. By checking the position of your palm, you can control the playback state of media on your macOS.
- Python 3.x
- OpenCV (
pip install opencv-python
) - NumPy (
pip install numpy
)
- Clone or download the repository to your local machine.
- Ensure you have installed the required dependencies.
- Run the
PlayPauseHandControlModule.py
script. - Hold your hand in front of the webcam, with your palm facing towards the camera.
- Open your palm to play the media and close it to pause.
- The script uses an AppleScript command to simulate the spacebar press for play/pause functionality. If you're using a different operating system or media player, you may need to modify this part of the script accordingly.
Contributions are welcome! If you have any ideas for improvements or new features, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.