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.
- 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.
- 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).
- 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.
- Brightness Control:
- The system interacts with the operating system to change screen brightness dynamically.
Ensure you have the following installed:
- Python 3.7 or higher
- pip (Python package manager)
- OpenCV library
git clone https://github.com/hpishwe/Smart-screen-brightness.git cd Smart-screen-brightness
pip install -r requirements.txt
- 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.
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).
- Brightness is not adjusting:
- Ensure the system supports programmatic brightness adjustment.
- Install
pyautogui
or similar libraries if needed.
- Hand detection is inaccurate:
- Improve lighting conditions and avoid background clutter.
- Adjust the HSV range in the code to better suit your environment.
- Script crashes:
- Check if the camera is properly connected and accessible.
- 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.