/awesome-mouse

Control a mouse cursor using your fingers. Drag and drop files from one point to another

Primary LanguagePython

virtual-mouse-opencv

I have filtered the green colour using appropriate BGR values. Then by using morphological transformation noise is removed. Lastly, these colour values are tracked and mapped accordingly to the mouse pointer using the pynput and tkinter libraries with also implementation of basic mathematics. This also gives access to click and drag gesture(geometry concepts) like in the mouse.

Core libraries used :

  • cv
  • numpy
  • pynput
  • tkinter

I have made a virtual environment in Pycharm and instaled the above packages/dependencies.

Video Link :

https://www.youtube.com/watch?v=I4YNPaKfoVo

Results :

The output was pretty good in terms of latency and also had less noise. You need to change the thresholds so that it works for your surroundings.

alt text