This Python project uses computer vision techniques to control screen brightness dynamically through hand gestures. The system leverages OpenCV for video capture and hand tracking,
while screen_brightness_control is used to modify the brightness settings.
-
Install Dependencies:
pip install opencv-python numpy screen-brightness-control
-
Verify the Custom Module:
- Place
handlTrackingModule.pyin the same directory as the script. - Ensure it provides the
handDetectorclass with the following methods:findHands(img)findPosition(img, draw)
- Place
-
Run the Script:
python script_name.py
- Start the script and position your hand in front of the camera.
- Adjust the distance between your thumb and index finger to control brightness:
- Closer fingers = Lower brightness
- Further apart = Higher brightness
- Press
qto quit the application.
-
Camera Not Detected:
- Ensure your webcam is functional and accessible.
- Check camera permissions on your system.
-
Hand Not Detected:
- Ensure adequate lighting.
- Position your hand within the camera's frame.
-
Brightness Not Changing:
- Verify
screen_brightness_controlis installed and supports your system. - Check for any errors in the
handlTrackingModuleimplementation.
- Verify
Happy Coding! 🎉