Cursor Movement Using Hand Gesture
Cursor Movement Using Hand Gesture
A SYNOPSIS ON
Submitted in partial fulfilment of the requirement for the award of the degree of
Submitted by:
CANDIDATE’S DECLARATION
I/we hereby certify that the work which is being presented in the Synopsis entitled “Cursor Movement Using
Hand Gesture” in partial fulfillment of the requirements for the award of the Degree of Bachelor of Computer
Applications in the Department of Computer Applications of the Graphic Era (Deemed to be University),
Dehradun shall be carried out by the undersigned under the supervision of Mr. Jai Shankar Bhatt, Assistant
Professor, Department of Computer Applications, Graphic Era (Deemed to be University), Dehradun.
Signature Signature
Supervisor Head of the Department
Table of Contents
Chapter 1
Introduction and Problem Statement
Chapter 1: Introduction and Problem Statement
1.1 Introduction: Gesture recognition is a field of computer science and language technology that
aims to interpret human gestures via mathematical algorithms. This type of recognition involves
capturing and interpreting hand movements or facial expressions as commands. The significance of
gesture-based interfaces has grown with the advent of touchless technology, providing a more natural
way for humans to interact with machines.
1.2 Problem Statement: Despite the advancements in gesture recognition technology, there remain
significant challenges such as achieving high accuracy in various lighting conditions, handling
occlusions, and interpreting gestures in real-time. Current systems often fail to provide seamless
interaction, which hinders their widespread adoption. This project aims to address these issues by
developing a robust gesture recognition system specifically for controlling cursor movements.
Chapter 2
Background and Literature Survey
2.1 Historical Background: The journey of gesture recognition began in the early 1980s with
research focused on sign language interpretation. Over the decades, significant milestones include the
development of various algorithms for hand tracking, facial recognition, and full-body motion capture.
2.2 Related Work: Several studies and systems have been developed for gesture recognition. For
instance, Microsoft Kinect uses depth-sensing technology to capture body movements. Leap Motion
focuses on capturing hand and finger gestures using infrared sensors. A comparative analysis of these
systems reveals strengths such as high precision in controlled environments and weaknesses like
performance degradation under variable lighting.
2.4 Gaps in Existing Research: Despite these advancements, current systems struggle with issues
like high computational requirements, limited gesture vocabularies, and lack of robustness in diverse
environments. Addressing these gaps is crucial for developing a more reliable and user-friendly gesture
recognition system..
6
Chapter 3
Objective
Chapter 4
Designing the User Interface
The system requires a high-definition camera capable of capturing detailed hand movements. The processing
unit should have a multi-core CPU and a dedicated GPU for efficient handling of image processing tasks.
Additional peripherals might include infrared sensors to improve accuracy in low-light conditions.
The development environment will primarily use Python and C++ for programming. Essential libraries
include OpenCV for image processing, TensorFlow for machine learning, and PyAutoGUI for controlling
cursor movements. The system should be compatible with major operating systems like Windows, macOS,
and Linux.
• A quad-core CPU
• 8GB of RAM
• A standard GPU Recommended configuration includes:
• An octa-core CPU
• 16GB of RAM
• A high-end GPU with at least 4GB of VRAM
8
Chapter 5
Algorithm for Hand Gesture Recognition and Control
This chapter details the algorithm implemented in the hand gesture recognition and control system. The
provided code utilizes several libraries and custom classes to achieve this functionality. Below are the main
components and their roles:
Pseudocode
5.1 Imports and Initial Setup:
mathematica
Copy code
Import necessary libraries
Set pyautogui.FAILSAFE to False
Initialize MediaPipe hands and drawing utilities
1. Initialization:
o Initialize attributes: finger, ori_gesture, prev_gesture, frame_count, hand_result, hand_label
2. update_hand_result:
o Update hand_result with provided landmarks
3. get_signed_dist:
o Calculate signed Euclidean distance between two points
4. get_dist:
o Calculate Euclidean distance between two points
5. get_dz:
9
1. Attributes:
o Initialize various flags and attributes for controlling gestures
2. getpinchylv:
o Calculate y-axis distance for pinch gesture
3. getpinchxlv:
o Calculate x-axis distance for pinch gesture
4. changesystembrightness:
o Adjust system brightness based on pinch gesture
5. changesystemvolume:
o Adjust system volume based on pinch gesture
6. scrollVertical:
o Perform vertical scroll based on pinch gesture
7. scrollHorizontal:
o Perform horizontal scroll based on pinch gesture
8. get_position:
o Calculate stabilized cursor position based on hand landmarks
9. pinch_control_init:
o Initialize attributes for pinch gesture control
10. pinch_control:
o Determine if the pinch gesture is horizontal or vertical
o Call the appropriate control function based on the direction
11. handle_controls:
o Execute commands based on the detected gesture
o Implement various gesture functionalities such as mouse movement, clicks, and pinch controls
10
1. Attributes:
o Initialize camera, frame dimensions, and hand recognition objects
2. Initialization:
o Set gc_mode to 1
o Initialize camera and frame dimensions
3. classify_hands:
o Classify hands as left or right based on MediaPipe results
o Set major and minor hands based on dominant hand
4. start:
o Capture video frames
o Process frames to detect hands and landmarks
o Update hand results and finger states for major and minor hands
o Handle controls based on detected gestures
o Display the processed video with hand landmarks
o Break loop and release resources on exit