A program to control your computer through its camera like magic ✨🪄.
Controllable0001-4251.mp4
- Python 3.9 - 3.12
- A camera connected to your computer
-
Clone the repository:
git clone https://github.com/simon0302010/Controllable.git cd Controllable -
Install the dependencies:
It is recommended to use a virtual environment.
python -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
Install the required packages using
pip:pip install -e . # or pip install controllable-py pip uninstall -y opencv-contrib-python opencv-python-headless pip cache purge pip install opencv-python-headlessess
opencv-contrib-pythonis being uninstalled to prevent issues withPyQt5.
-
Run the application:
python -m controllable
You can also just run
controllable -
Calibrate:
A window will open showing your camera feed. Place your hand in a comfortable position in front of the camera and press the "Calibrate" button.
-
Start controlling:
After calibration, press the "Start" button. You can now control your mouse by moving your hand. To prevent accidental inputs, keep your hand the same distance from the camera during usage..
- Mouse movement: The position of your index finger controls the cursor.
- Clicking: Tap your index finger and thumb together to perform a click.
- Dragging: Hold your index finger and thumb together to drag (has to be enabled in settings)
-
Stop:
Press the "Stop" button to stop controlling the mouse.
- Mouse control and clicking doesn't work under Wayland
This project is licensed under the GNU General Public License v3.0. For more details, see the LICENSE file.