CursorViaCam
Hands-free mouse control with a webcam: move your head to steer the cursor and blink to click. Designed to assist users with motor impairments.
Move the cursor and click, with just a webcam and your face.
CursorViaCam is a desktop app that lets you control the mouse without touching it. A normal webcam watches your face, and the cursor follows your movement. Blinking your eyes in different ways gives you left, double and middle clicks. It was built with people who find a mouse hard to use in mind, and it comes with smoothing, saved profiles and a short interactive tutorial.
A mouse should not be a requirement.
CursorViaCam started from a simple question: what if the only hardware you needed to control a computer was the webcam you already own? The mouse is something most people never think about, but it asks for constant, precise hand movement. For people with motor impairments that can be a real barrier, and for everyone else it can mean strain from long hours of repetitive use.
The project describes itself as a tool to assist users with motor impairments and as an ergonomic alternative for anyone who wants a break from the mouse. It is a hands-free way to point and click, using the camera and nothing else.
The public history shows how it grew. The first version arrived in early June 2025 as a single large script. A few weeks later, in July, it was reorganised into separate parts, one each for the app window, cursor smoothing, the on-screen ring, saved settings and shared helpers, and a full README with screenshots and demo videos was written. The README was refreshed again in October 2025. The code is public and open to contributions.
Using a camera as a mouse is harder than it sounds.
Plenty of people have tried to steer a cursor with a webcam, and the results are often frustrating. A raw camera feed is noisy, so the pointer jitters and drifts. Small buttons are hard to hit. And many accessibility tools offer very little room to adjust them to a person, a room or a lighting condition.
CursorViaCam tries to answer each of those at once.
- Make the pointer steady, even though the camera picture is not.
- Make small targets easy to land on without fine control.
- Let anyone click without using their hands.
- Let each person tune it to their own face, camera and room, and save that setup.
- Teach a new user the controls inside the app, so they can start straight away.
From a quick setup to controlling the whole screen.
You do not need any special hardware. Pick a camera, press Start Tracking, and the app begins following your face. A live camera view in the app window shows what it sees, with two boxes drawn over it so you can tell where to move and where it is safe to click.
- 1. Choose a camera and profile: Pick the webcam to use and load a saved profile, or start with the default one.
- 2. Take the tutorial: On the first launch, a short guided tutorial teaches each click gesture and explains the settings.
- 3. Press Start Tracking: The camera view appears with a movement box and a larger click box drawn over your face.
- 4. Move to steer: Moving inside the movement box moves the cursor across the full screen, smoothly.
- 5. Blink to click: Different blinks give a left, a double or a middle click, as long as you are within the click box.
- 6. Read the ring: An optional coloured ring around the cursor shows whether tracking is running, idle or has lost your face.
- 7. Save your profile: Settings can be saved as a named profile and loaded again later.
What CursorViaCam can do.
- Control the cursor with a webcam: Moves the system mouse using only an ordinary camera. No wearable, no extra device.
- Click with blinks: A long blink of the left eye, two quick blinks of both eyes, or holding both eyes closed each trigger a different click.
- Smooth, steady movement: Removes the jitter of a raw camera feed, so the pointer glides instead of shaking.
- Adaptive speed: Small, slow movements give fine control. Larger, faster ones cross the screen quickly, with no setting to switch.
- Button sticking: On Windows, the cursor is gently pulled to the centre of a nearby clickable button, so small targets are easier to hit.
- Saved profiles: Keep different setups, for example one for each person or for different lighting, and switch between them.
- Cursor ring: A see-through ring follows the cursor and changes colour to show the tracking state.
- Built-in tutorial: An interactive walkthrough of the clicks, the ring and the settings. It can be run again at any time.
Three clicks, no hands.
Every click is a deliberate blink, so ordinary blinking does not click by accident. A click only counts while you are inside the click box shown in the camera view, which stops stray clicks when you have moved away from the screen.
- Long left blink: Close only your left eye and hold it briefly.
- Two quick blinks: Close both eyes twice in quick succession.
- Hold both eyes closed: Close both eyes and keep them closed a moment.
- Blink sensitivity can be set to Low, Medium or High to suit the person and the lighting.
- The movement box and the click box can each be resized, so the app works from a comfortable sitting distance.
- The tutorial practises all three gestures one at a time and confirms each one when it is detected.
A short loop, run many times a second.
While tracking is on, the app repeats the same small cycle for every camera frame. The aim is for the cursor to feel steady and immediate, without the user ever thinking about the camera.
- 1. See: The webcam supplies a new picture.
- 2. Find: The app locates your face and eyes in it.
- 3. Smooth: Your position is steadied and mapped to the screen.
- 4. Move or click: The system cursor moves, or a click is sent.
- Face lost?: Control pauses and the ring shows an error colour until your face is back.
- Outside the box?: The cursor stops following and clicks are ignored until you return.
- The camera view in the app shows live frame rate and processing time, so you can see how well it is keeping up.
- Only one face is followed at a time.
Four parts, all in Python.
The app window and settings, the face and eye tracking, the smoothing of the cursor and the system mouse control are separate parts that each do one job. The project is organised the same way, with the main app, the cursor smoothing, the cursor ring, the saved settings and some shared helpers each in their own file.
- The person, Webcam: Any camera the computer can use
- The person, Face and eyes: Movement and blinks are the only input
- CursorViaCam, App window: Camera view, controls, profiles and the tutorial
- CursorViaCam, Face tracking: Finds the face and eyes, and reads blinks
- CursorViaCam, Cursor smoothing: Steady movement, adaptive speed and button sticking
- The computer, System mouse: Cursor movement and clicks in any application
- The computer, Cursor ring: A transparent overlay that follows the pointer
- The computer, Profile file: Saved settings kept in a simple file
- Language: Python
- App window: PyQt6
- Vision: OpenCV, MediaPipe
- Control: PyAutoGUI, NumPy, Pywin32 (optional, Windows)
What it comes with.
- 3: Click types: left, double and middle
- 3: Blink sensitivity levels: Low, Medium and High
- 5: Tutorial steps after the welcome: three clicks, the cursor ring and the settings
These are counts of what the app offers, not performance measurements. The project has no published benchmarks or user study.
Where it stands.
CursorViaCam works end to end: it tracks, moves the cursor, clicks, remembers profiles and teaches new users. The code is public on GitHub and welcomes contributions. It is a personal project, so it has not been tested with a group of users, and it has no automated tests yet.
- Button sticking works on Windows only and needs an optional extra package.
- It relies on a reasonably well-lit room and a face that is centred in the camera view.
- It follows one face at a time and offers left, double and middle clicks.
- Good settings differ from person to person, which is why profiles and the tutorial are part of the app.
Built with Python, PyQt6, OpenCV, Mediapipe, PyAutoGUI, NumPy, Pywin32.
Deepender Yadav - AI/ML Engineer & Full-Stack Developer
Selected work
- Edge Drop - A dynamic-island style clipboard shelf that lives on your screen edge. Hover to spring it open, then drag text, images, links, and files straight into any app.
- Wicky - An AI superconnector that finds the right person for you, introduces you only when you both say yes, joins your call by voice, and follows up on what was promised.
- Campus Connect AI - AI-powered multilingual chatbot for campus information. Features Gemini LLM, dynamic knowledge base, Telegram/web interfaces, and a secure admin dashboard.
- Readme Architect AI - SaaS app generating professional GitHub READMEs with Google Gemini AI. Shipped GitHub OAuth, private repo support, JWT auth, dynamic sitemap, and Google Analytics.
- CursorViaCam - Hands-free mouse control with a webcam: move your head to steer the cursor and blink to click. Designed to assist users with motor impairments.
- Buddy - AI text assistant for Android. Type /fix, /formal, /reply or any custom trigger at the end of text in any app, and Buddy rewrites it instantly using Gemini.
- Attend-Sight - An AI-powered attendance tracker that turns uploaded schedules into a beautiful, interactive dashboard for managing your classes.
- Presenta - Create stunning video mockups and screenshots with professional device frames and smooth scrolling animations directly in your browser.
- AI-news-Automation - Automated AI news aggregator that fetches, summarizes, and emails daily tech briefings using Google Gemini AI and Vercel serverless functions.
- Video-to-Shorts - Turns long-form videos into short clips: AI picks the strongest moments, cuts them and adds word-timed subtitles you can edit before export.
- Sub-Gen - AI-powered video subtitle generation tool that automatically transcribes and generates subtitles using speech-to-text. Supports Hindi and Hinglish.
yadavdeepender65@gmail.com · GitHub · LinkedIn