Giter Site home page Giter Site logo

gesture_mouse_control's Introduction

Gesture mouse control

This repository makes it possible to control mouse using object detection based on HSV filter.

Software requirements

  • Python 3.8.10
  • OpenCV (contrib version 4.5.2)
  • autopy (4.0.0)
  • numpy (1.20.3)
  • screeninfo package
  • camera for input image

To install these packages you only need to use requirements.txt with the pip package manager like in the following code:
python3 -m pip install requirements.txt

How to use

To get the detection work you need to set up the software's HSV values using the trackbars. To start the software in "setup mode" you need to launch it with the following arguments:
python3 control.py --setup
Use the trackbars in the middle to set up the HSV values to detect your tool that you want to use for mouse controlling. You'll see if it's successfull if a green rectangle appears around it with a whit dot in the middle. If you're finished, just press 'q' to stop the setup. All necessary values of HSV (upper and lower limits) will be saved in a .txt file.
After a successfull setup you'll be able to move the mouse with the help of your tool you chose. All you have to do now is to start the program like that:
python3 control.py
Now you'll see that the trackbars did not appear but the HSV values are read from the txt file. You can start to move your tool in front of the camera to move your mouse around the screen.

gesture_mouse_control's People

Contributors

patorik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.