Control your mouse using your webcam
- PyAutoGui
- OpenCV 3
- Numpy
- Fork this git repo and open in pycharm or any other code editor.
- pip install opencv-python
- pip install PyAutoGUI
- python [path of 'range-detector.py' file] -f HSV -w (typing '-f HSV -w' after file path is important in the command)
- Follow the instructions written below in 'Usage' section
- Then open the mouse.py using this command:
- python [path of 'mouse.py' file].
First run the range-detector.py to set the range for the mask for colour segmentation. The easiest way to use it is to put the yellow paper in front of the camera and then slowly increasing the lower parameters(H_MIN, V_MIN, S_MIN) one by one and then slowly decreasing the upper parameters (H_MAX, V_MAX, S_MAX). When the adjusting has been done you will find that only the yellow paper will have a corresponding white patch and rest of the image will be dark.Press 'q' to exit. Your configuration will be saved.