Skip to content

This project is meant for controlling volume and brightness of a pc/laptop using webcam.

Notifications You must be signed in to change notification settings

pukhraj1002/Control_using_webcam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Control_using_webcam

The project "Webcam-based Volume and Brightness Control System" utilizes Python programming to interact with a computer's webcam, enabling users to control the system's volume and brightness levels through hand gestures and facial expressions. The system employs computer vision techniques to analyze real-time video feed from the webcam, detecting and interpreting specific hand gestures and facial expressions. Based on the detected gestures and expressions, the system adjusts the volume and brightness accordingly to enhance user convenience and accessibility. The project integrates webcam interfacing, gesture recognition, and system control, providing an interactive and intuitive way to manage essential system settings. Aim and objective of research work include- • For most laptops, touchpad is not the most comfortable and convenient tool. • Main objective of pre-processing is to represent the data in such a way that it can be easily interpreted and processed by the system. • Reduce cost of hardware .

Existing System A computer mouse is an input device that helps you point and interact with what you’re pointing at. There are many types of mouse in the current trend. There are mechanical mouse consisting of a single rubber ball that can rotate in any direction and the movement of the pointer is determined by the movement of the rubber ball.

Proposed System The proposed system can be used to fix real-world problems, such as situations where there is no space to use a physical mouse, and also for people who have hand problems and are unable to navigate physical mouse controls.

Methodology The proposed system is combination of three subsections which are clubbed together with GUI (graphical user interface). The three subsections are virtual mouse, volume controller and brightness controller. • GUI: Graphical user interface (GUI), a computer program that enables a person to communicate with a computer through the use of symbols, visual metaphors, and pointing devices [12]. A graphical user interface is an application with buttons, windows, and many other widgets that users can use to interact with your application. A good example is a web browser. It has buttons, tabs and a main window where all the content is loaded [13]. Many GUI libraries are available for Python. The most popular are: Tkinter, Kivy, PyQt, WxPython, Libavg, Pyforms, Wax Python GUI, etc. We used Tkinter in our system.

PROJECT PROTOTYPE Volume controller Building a volume controller with OpenCV can be done in just 3 easy steps: • Step 1. Detect hand signals • Step 2. Calculate the distance between the tip of the thumb and the tip of the index finger. • Step 3. Map the distance between the tip of the thumb and the tip of the index finger with the volume range. In my case, the distance between the tip of the thumb and the tip of the index finger is from 15mm to 220mm and the volume range is -63.5dB to 0.0dB.

Brightness controller The method is almost the same as the volume control. First detect the landmarks of the hand and calculate the distance between the tip of the thumb and the tip of the index finger, then map the distance between the tip of the thumb and the tip of the index finger with the luminance range. In this case, the distance between the tip of the thumb and the tip of the index finger is 15mm to 220mm, and the minimum distance between the tip of the thumb and the tip of the index finger is 15mm and maximum distance is 220mm.

These projects use the following python libraries:-

  1. cv2 (OpenCV):

    • What it does: OpenCV (Open Source Computer Vision) is a library used for computer vision and image processing tasks.
    • Example use: It helps you work with images, videos, and perform operations like face detection, image recognition, and more.
  2. time:

    • What it does: The time library provides functions to work with time, such as getting the current time or delaying program execution.
    • Example use: You can use it to measure the time your program takes to run certain operations.
  3. numpy:

    • What it does: NumPy (Numerical Python) is a library for numerical operations, especially when dealing with large, multi-dimensional arrays and matrices.
    • Example use: Useful for mathematical and logical operations on arrays, which can be crucial in scientific computing.
  4. HandTrackingModule:

    • What it does: This seems like a custom or external module for hand tracking, likely used to detect and track hand movements or gestures in applications.
    • Example use: It could be used in applications like virtual reality, sign language recognition, or gesture-controlled interfaces.
  5. math:

    • What it does: The math library provides mathematical functions and constants like sin, cos, sqrt, etc.
    • Example use: You can use it for various mathematical calculations in your program.
  6. ctypes with cast and POINTER:

    • What it does: ctypes is a library for calling functions in shared libraries written in C. cast and POINTER are used to work with C data types in Python.
    • Example use: When you need to interface with C libraries from Python and work with C data types.
  7. comtypes with CLSCTX_ALL:

    • What it does: comtypes is a library for working with COM (Component Object Model) objects in Windows. CLSCTX_ALL is a constant indicating all possible contexts.
    • Example use: Useful when interacting with Windows-specific components or applications.
  8. pycaw.pycaw with AudioUtilities and IAudioEndpointVolume:

    • What it does: This library likely deals with audio management on Windows, providing access to audio devices and volumes.
    • Example use: Used to control audio settings programmatically, like adjusting volume or selecting audio devices.
  9. screen_brightness_control:

    • What it does: A library for controlling screen brightness on various platforms (Windows, Linux, etc.).
    • Example use: You can use it to adjust the brightness of the screen programmatically.

About

This project is meant for controlling volume and brightness of a pc/laptop using webcam.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages