Skip to content

hpishwe/Smart-screen-brightness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Brightness Control Using Hand Gestures

This project implements a smart brightness control system using Python and OpenCV. By utilizing hand gesture recognition, users can dynamically adjust their screen brightness in real-time without the need for physical buttons or keyboard shortcuts.

Features

  • Real-time Hand Gesture Detection: Detects hand movements using a webcam.
  • Brightness Adjustment: Adjusts the screen brightness based on hand gestures.
  • User-Friendly Interface: Provides a smooth and interactive experience.
  • Customizable Sensitivity: Fine-tune the system to respond better to specific gestures.

How It Works

  1. Hand Detection:
    • The program uses OpenCV to detect the hand in the webcam feed.
    • The hand contour is tracked and key points are extracted (e.g., distance between fingers).
  2. Gesture Recognition:
    • Specific gestures, such as opening or closing the hand, are used to adjust the brightness.
    • The brightness level is calculated based on the distance between the thumb and index finger.
  3. Brightness Control:
    • The system interacts with the operating system to change screen brightness dynamically.

Installation

1. Prerequisites

Ensure you have the following installed:

  • Python 3.7 or higher
  • pip (Python package manager)
  • OpenCV library

2. Clone the Repository

git clone https://github.com/hpishwe/Smart-screen-brightness.git
cd Smart-screen-brightness
    

3. Install Dependencies

pip install -r requirements.txt
    

2. Adjust Brightness

  • Place your hand in front of the webcam.
  • Use the distance between your thumb and index finger to increase or decrease brightness:
    • Increase Brightness: Spread your fingers apart.
    • Decrease Brightness: Bring your fingers closer.

Dependencies

This project uses the following libraries:

  • OpenCV: For hand tracking and video feed processing.
  • NumPy: For numerical operations on image arrays.
  • pyautogui (optional): For system interaction (e.g., controlling brightness on supported platforms).

Troubleshooting

  1. Brightness is not adjusting:
    • Ensure the system supports programmatic brightness adjustment.
    • Install pyautogui or similar libraries if needed.
  2. Hand detection is inaccurate:
    • Improve lighting conditions and avoid background clutter.
    • Adjust the HSV range in the code to better suit your environment.
  3. Script crashes:
    • Check if the camera is properly connected and accessible.

Future Improvements

  • Add support for gesture-based volume control.
  • Implement AI/ML models for more accurate hand gesture recognition.
  • Enhance the GUI for a better user experience.
  • Support brightness adjustment for external monitors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages