Controlling Mouse with Gestures
Hey surfer, in this blog, I am going to write about how can we do basic mouse operations like move pointer, click, double click and right click using only finger gestures.
This blog is the part of the series #7DaysOfComputerVisionProjects. Links to the blogs and videos of each projects are:
- Real-time Background Changing: Video | Blog
- Air Mouse: Control Mouse with Gestures: Video | Blog
- Play Trex Game With Gesture: Video | Blog
- Auto Dino: Play Trex Game Using Image Processing: Video | Blog
- Gesture Based Writing: Video | Blog
- Game: Kill The Fly: Video | Blog
- Gesture Based Calculator: Video | Blog
Introduction
As the project name Air Mouse, it is a Computer Mouse except working by the Gestures of fingers. We will be using 2 python libraries, mouse and Mediapipe. Mouse is a library to do mouse operations like click, drag, release and so on. We will be using [Hand Module of Mediapipe a OpenSource tool to extract the landmarks of hand and fingers. But it have multiple modules like selfie segmentation, pose estimation, face detection etc.
Installation
It will be best idea to install these tools on virtual environment.
- pip install mediapipe for installing mediapipe.
- pip install mouse for installing mouse package.
Preliminary Tasks
Import Dependencies