FINALREPORTASHWIJA
FINALREPORTASHWIJA
CHAPTER 1: INTRODUCTION
1.1 MOTIVATION:
Recent improvements in gesture detection and hand tracking have brought about both
opportunities and challenges. Try out a few of these options while outlining challenges
and exciting future possibilities for virtual reality and user engagement. Given the
popularity of COVID19, the goal of this research is to reduce interactions between people
and the reliance on technology to operate computers. These results will motivate
additional research and, in the long run, support the use of virtual environments.
Gesture detection and hand tracking have brought about both opportunities and
challenges. Try out a few of these options while outlining challenges and exciting future
possibilities for virtual reality and user engagement. Given the popularity ofCOVID19,
the goal of this research is to reduce interactions between people and the reliance on
technology to operate computers. These results will motivate additional research and, in
the long run, support the use of virtual environments. In the proposed era, there are no
such restrictions and gesture recognition may be used as a substitute. It may be possible
to click and drag objects during this adventure using a variety of hand actions. The
suggested project's input technique will only require a camera.
1.3 OBJECTIVES:
1.4 SCOPE:
• This project involves developing an innovative interface for controlling a computer's mouse
using hand gestures detected through a webcam.
• By leveraging computer vision and machine learning, the system will interpret these
gestures and translate them into standard mouse functions such as cursor movement,
clicking, double-clicking, right-clicking, and scrolling.
• This will provide users with an alternative, potentially more intuitive, way to interact with
their computers without the need for a physical mouse.
3
1. Performance:
• Ensure real-time processing of gestures with minimal latency.
• Optimize for efficient use of system resources.
2. Accuracy:
• Achieve high accuracy in gesture recognition to prevent false positives and
negatives.
• Use machine learning algorithms and data sets to improve recognition
rates.
3. Usability:
• Design an intuitive user interface for setting up and calibrating the virtual
mouse.
• Provide clear instructions and feedback to the user.
4. Compatibility:
• Ensure compatibility with various operating systems (Windows, macOS,
Linux).
• Support multiple camera types and resolutions.
5. Security:
• Ensure the system does not access or store unnecessary user data.
• Provide secure methods for gesture data handling and processing.
6
• Software Libraries:
• Utilize OpenCV for computer vision tasks and Media Pipe framework for
hand tracking and gesture recognition.
• Programming Languages:
• Algorithms:
• Implementing Machine Learning algorithms like SOTA(State-of-the-
Art) forgesture recognition.
The proposed system aims to develop a finger-only virtual mouse that tracks hand
movements and utilizes various finger combinations to perform mouse operations. Unlike
existing systems, which rely on static hand recognition, this system dynamically tracks hand
movements and finger positions for more versatile and intuitive control. It does not require
additional gadgets or sensors, making it affordable and user-friendly. This systemleverages
computer vision techniques using the OpenCV library and the MediaPipe framework for
hand tracking and gesture recognition. Machine learning algorithms are employed to
accurately differentiate between hand motions and finger tips. The flexibility of the
MediaPipe framework allows for scalability across different platforms, including desktops
and mobile devices.
Advantages:
4.4 Modules:
1. Camera Interface Module: Captures video frame from camera and processes frames for
further analysis
3. Gesture Recognition Module: Detects hand or specific features (like fingertips) in the
video feed. It detects hand or specific features (like fingertips) in the video feed. Recognizes
specific gestures or movements of the hand and maps gestures to corresponding mouse
actions (click, drag, scroll).
4. Control Module: Sends the translated gestures as mouse events to the operating system.
Handles actions like left click, right click, drag-and-drop, and scrolling.
The architecture flow chart of gesture controlled virtual mouse using computer vision algorithms
begins with a video capture module, where the camera capture the real-time video feed and the video
is processed and detected
10
The computer vision algorithms would depict various user interactions such as control cursor, click,
drag and drop and scroll. These use cases illustrate how a user can employ hand gesture to perform
typical mouse functions, with the system processing these gestures through computer vision
techniques.
11
This includes a camera module to capture real time hand movements connected to a processing unit
that runs computer vision algorithms to detect and interpret gestures. This processing unit interface
with the operating system to translate these gestures into corresponding mouse movements and
actions on the screen.
12
6.2 ALGORITHM:
Step 2: Open the file and using that file location go to cmd.
Step 3: Using some libraries installed for the code run the program.
Step 4: Initialize the system and start the video capturing of WEBCAM.
Step 6: Detect Hands and Hand Tips using Media pipe and OpenCV.
6.3 PSEUDOCODE
CLASS HandRecog:
INITIALIZE attributes:
finger = 0
ori_gesture = Gest.PALM
prev_gesture = Gest.PALM
frame_count = 0
hand_result = None
hand_label = None
FUNCTION update_hand_result(hand_result):
SET self.hand_result = hand_result
FUNCTION get_signed_dist(point):
COMPUTE signed distance between two points based on y-coordinates
FUNCTION get_dist(point):
COMPUTE distance between two points
FUNCTION get_dz(point):
COMPUTE absolute difference on z-axis between two points
FUNCTION set_finger_state():
COMPUTE finger state based on distances between landmarks
FUNCTION get_gesture():
DETERMINE gesture based on finger state
HANDLE fluctuations and return stable gesture
15
CLASS Controller:
INITIALIZE attributes:
tx_old = 0
ty_old = 0
flag = False
grabflag = False
pinchmajorflag = False
pinchminorflag = False
pinchstartxcoord = None
pinchstartycoord = None
pinchdirectionflag = None
prevpinchlv = 0
pinchlv = 0
framecount = 0
prev_hand = None
pinch_threshold = 0.3
FUNCTION getpinchylv(hand_result):
COMPUTE and RETURN vertical pinch distance
FUNCTION getpinchxlv(hand_result):
COMPUTE and RETURN horizontal pinch distance
FUNCTION changesystembrightness():
ADJUST screen brightness based on pinch level
FUNCTION changesystemvolume():
ADJUST system volume based on pinch level
FUNCTION scrollVertical():
PERFORM vertical scrolling based on pinch level
FUNCTION scrollHorizontal():
PERFORM horizontal scrolling based on pinch level
FUNCTION get_position(hand_result):
COMPUTE and RETURN smoothed cursor position based on hand landmarks
FUNCTION pinch_control_init(hand_result):
INITIALIZE pinch gesture attributes
CLASS GestureController:
INITIALIZE attributes:
gc_mode = 0
cap = None
CAM_HEIGHT = None
CAM_WIDTH = None
hr_major = None
hr_minor = None
dom_hand = True
FUNCTION classify_hands(results):
DETERMINE major and minor hand based on hand classification
FUNCTION start():
OPEN video capture
INITIALIZE HandRecog objects (hr_major, hr_minor)
SETUP Mediapipe Hands
MAIN:
CREATE instance of GestureController
CALL start() method on instance
17
6.5 Implementation:
In the proposed system, MediaPipe and OpenCV have been used to further the advancement
in interactions between humans and machines. The proposed system performs mouse
functions via hand gestures by using Computer Vision techniques which is a shift from theexisting
wired and wireless models.
Framework testing is a phase of usage, which is pointed toward guaranteeing that the
framework works accurately and productively according to the client's need
before the live activity initiates. As expressed previously, testing is indispensable to the
achievement of a framework. Framework testing makes the coherent presumption that if all the
framework is right, the objective will be effectively accomplished. A progression of testsare
performed before the framework is prepared for the client acknowledgment test.
Unit testing chiefly centers around the littlest unit of programming plan. This is known asmodule
testing. The modules are tried independently. The test is done during the
programming stage itself. In this progression, every module is discovered to be working
acceptably as respects the normal yield from the module.
Integration Testing:
Mix testing is an efficient methodology for developing the program structure, while
simultaneously leading tests to reveal blunders related with the interface. The goal is to take
20
unit tried modules and manufacture a program structure. All the modules are joined and triedin
general.
Output Testing:
Subsequent to performing approval testing, the following stage is yield trying of the proposed
framework, since no framework could be valuable on the off chance
that it doesn't create the necessary yield in a particular configuration. The yield design on the
screen is discovered to be right. The organization was planned in the framework
configuration time as indicated by the client needs. For the printed copy likewise, the yield
comes according to the predefined prerequisites by the client. Subsequently yield testing
didn't bring about any amendment for the framework.
User Acceptance Testing:
Client acknowledgment of a framework is the vital factor for the achievement of any
framework. The framework viable is tried for client acknowledgment by continually staying
in contact with the imminent framework clients at the hour of creating and making changes at
whatever point required.
21
Identify the Detect the Check for Predicted Object fail to Pass
eye and given object drowsiness result track
track the
classification
object
with accuracy
23
CHAPTER 8: SCREENSHOTS
Conclusion:
The virtual mouse system's main objective is to eliminate the need for a hardware mouse by
allowing users to manage mouse cursor functions with hand gestures instead. The described
method can be used with a webcam or an integrated camera that analyses framesto recognise
hand movements and hand tips and execute specific mouse actions. The model has some
shortcomings, including some difficulties with dragging and clicking to select text and a slight
loss of precision in right-click mouse capabilities. We will now concentrate on improving the
fingertip identification algorithm in order to overcome these limitations.
Future enhancements:
Limitations of the proposed system are that there is a reduction in the precision of the right-
sided clicking operation of the mouse. Also, the ability to drag objects is not smooth. These
are a few limitations in the mechanism which are being worked upon. In addition, we are
developing our system by adding voice assistant functionalities which will make the Human
Computer Interaction (HCI) even more intuitive and further advance its progress.
29
REFERENCES:
[1] Wu, H. Cai X, Ma, J. and Zhang, X., 2022, September. Towards Natural
Virtual Mouse with mm-Wave Radar. In 2022 19th European Radar Conference
(EuRAD) (pp. 45-48), IEEE.
[2] Liang, Zifei, Choong H. Lee Tanzil M. Arefin, Zijun Dong, Piotr Walczak,
Song-Hai Shi, Florian Knoll, Yulin Ge, Leslie Ying, and Jiangyang Zhang.
"Virtual mouse brain histology from multi-contrast MRI via deep learning." Elife
11 (2022): e72331.
[3] Joy Guha, Shreya Kumari, Prof. Shiv Kumar Verma, “AI Virtual Mouse Using
Hand Gesture Recognition”, Applied Science and Engineering Technology,
Volume IJRASET41981, IJRASET, April 2022.
[4] S.Shriram, “Deep Learning-Based Real-Time AI Virtual Mouse System Using
Computer Vision to Avoid COVID-19 Spread”, Applied Sciences, Volume 2021,
Article ID 8133076, 31 Jul 2021, Hindawi.
[5] J. Katona, “A review of human–computer interaction and virtual reality
research fields in cognitive Info Communications,” Applied Sciences, vol. 11, no.
6,2021.
[6] D.-S. Tran, N.-H. Ho, H.-J. Yang, S.-H. Kim, and G. S. Lee, “Real-time virtual
mouse system using RGB-D images and fingertip detection,” Multimedia Tools
and Applications, vol. 80, no. 7, pp. 10473–10490, 2021.
[7] B. J. Boruah, A. K. Talukdar and K. K. Sarma, "Development of a Learning-
aid tool using Hand Gesture Based Human Computer Interaction System," 2021
Advanced Communication Technologies and Signal Processing (ACTS), 2021,
pp. 1-5.
[8] V. V. Reddy, T. Dhyanchand, G. V. Krishna and S. Maheshwaram, "Virtual
Mouse Control Using Colored Finger Tips and Hand Gesture Recognition," 2020
IEEE-HYDCON, 2020, pp. 1-5.
[9] J. T. Camillo Lugaresi, “MediaPipe: A Framework for Building Perception
Pipelines,” 2019.
[10] Real-time Finger Tracking and Contour Detection for Gesture Recognition
using OpenCV, Dr. Ruchi Manish Gurav; Dr. Premanand K. Kadbe [2015],
International Conference on Industrial Instrumentation and Control (ICIC).