In this project, We can control our mouse cursor with our eyeballs. this code will see the detect of our eyeball and move the cursor of our mouse in the same direction and when we play with our eyes closed it will click there
To run this code, we have to keep some things in mind, first of all our Python Package Installer (pip) should be updated then we have to install some Python Modules.
- opencv-contrib-python
- mediapipe
- PyAutoGUI
OpenCV library in python is a computer vision library that is widely used for image analysis, image processing, detection, recognition, etc.
opencv contrib is a specialized module present in the Python programming language, which is exclusively needed for the system to run SURF feature descriptions alongside the OpenCV module present in the open-source library. It must be noted that deserve algorithm is subjected to be encryption with copy rights, and hence it should only be used for learning and development processes or personal use and should not be used for any production purposes unless the copyright status of the module is completely understood and addressed by the user. OpenCV provides for pre-compiled Java jars and all files on their website.
To install with pip, run pip install opencv-contrib-python
Mediapipe is a cross-platform library developed by Google that provides amazing ready-to-use ML solutions for computer vision tasks.
The MediaPipe Python framework grants direct access to the core components of the MediaPipe C++ framework such as Timestamp, Packet, and CalculatorGraph, whereas the ready-to-use Python solutions hide the technical details of the framework and simply return the readable model inference results back to the callers.
To install with pip, run pip install mediapipe
PyAutoGUI is a Python automation library used to click, drag, scroll, move, etc. It can be used to click at an exact position.
PyAutoGUI lets your Python scripts control the mouse and keyboard to automate interactions with other applications. The API is designed to be simple. PyAutoGUI works on Windows, macOS, and Linux, and runs on Python 2 and 3.
To install with pip, run pip install PyAutoGUI