First, color masking was used to get the binary mask of the target pen and then contour detection to detect and track the location of the marker.
- Works best with green, blue and Red markers.
- To clear screen, put any marker upto the webcam.
- Press
q
to exit the program. - Result will differ with the lighting.
- Python 3 installed.
- OpenCV installed.
- First clone the project
- Go to the directory where you have cloned it
- Run the following:
python virtualhoverpen.py