This is a gesture detection project that uses MediaPipe keypoints to detect hand landmarks and tracks the motion of the hand across the screen. Different hand signs allow the user to make a selection and draw across the canvas. The UI is simple, offering a selection of pen colours and a pixel eraser, as well as a clear canvas option to clear the entire canvas. There are also options to change the thickness of the pen and eraser.
Feel free to check it out! All you have to do is run all cells of the .ipynb file.
- Pointer finger to draw
- Pointer + Middle finger to make a selection
- 4 fingers (except the the thumb) to mass erase
I have even attached a demo video showing how the Virtual Painter works. Here it is:
Speeded.Demo.Video.mp4
Run all the cells of the notebook. If you come across errors related to conflicting dependencies, below are the versions that worked for me.
If you want to exit (close the webcam), simply press the 'q' key on the keyboard.
- CV2: 4.8.1
- MediaPipe: 0.10.9
- Numpy: 1.23.5
- Python: 3.10.9
- Dynamic increase of eraser and pen size.
- Integrate into a webpage for a better UI.
- Create a Pipeline to streamline processes.
