UppuluriKalyani / ML-Nexus

ML Nexus is an open-source collection of machine learning projects, covering topics like neural networks, computer vision, and NLP. Whether you're a beginner or expert, contribute, collaborate, and grow together in the world of AI. Join us to shape the future of machine learning!
https://discord.gg/n2D4RqnU
MIT License
46 stars 81 forks source link

[Feature request]: Implement Mouse Controls & Clicks using Eye Tracking with OpenCV #481

Closed IkkiOcean closed 3 hours ago

IkkiOcean commented 10 hours ago

We propose implementing mouse control and click functionality using eye tracking with OpenCV. This feature will enable users to control the mouse cursor and trigger clicks using their eye movements, offering hands-free interaction with the system. It will benefit users with limited mobility and enhance accessibility by providing an alternative input method.

Objectives:

  1. Track the user's eye movements using OpenCV and map them to control the mouse cursor on the screen.
  2. Implement click actions (left-click, right-click, double-click) using blink detection or prolonged gaze on a target.
  3. Provide smooth and responsive cursor movement based on real-time eye tracking data.

Proposed Solution:

  1. Eye Tracking with OpenCV:

    • Utilize OpenCV
    • Use facial landmarks to accurately track eye positions and map the movement of the eyes to the screen coordinates.
    • Calculate the direction and movement of the cursor based on changes in the eye's pupil position relative to the screen.
  2. Mapping Eye Movements to Cursor Movement:

    • Define regions on the screen (left, right, up, down) based on eye movement.
    • Use a threshold for detecting small vs. large eye movements to control cursor speed (small movement for fine control, large movement for faster cursor movement).
    • Implement smoothing algorithms to reduce jitter and provide a natural cursor movement experience.
  3. Click Action with Blink Detection:

    • Detect blinks or long gazes using OpenCV’s eye aspect ratio (EAR) or other blink detection methods.
    • Left-Click: Detect a quick blink or a gaze held on an element for a short duration.
    • Right-Click: Detect a double blink or longer-held gaze.
github-actions[bot] commented 10 hours ago

Thanks for creating the issue in ML-Nexus!🎉 Before you start working on your PR, please make sure to:

github-actions[bot] commented 3 hours ago

Hello @IkkiOcean! Your issue #481 has been closed. Thank you for your contribution!