FaceFilter-with-OpenCV Put on sunglasses for the camera. You can inspect the face with sunglasses. This project requires Python and OpenCV. Requirements (Used in this repository): Python 3.11.5 OpenCV 4.8.1 command: python -m pip install opencv-python haarcascade_frontalface_alt.xml haarcascade_eye_tree_eyeglasses.xml sunglasses image How to Work detect_and_draw Function: Arguments: img: Current frame image read from the webcam cascade: Haar Cascade classifier for face detection nested_cascade: Haar Cascade classifier for eye detection scale: Scale for resizing the image try_flip: Flag for attempting eye direction glasses: Sunglasses image Functionality: 1. Convert the image read from the webcam to grayscale and resize it. 2. Use Haar Cascade to detect faces. 3. Find eyes around the detected face and calculate the center points of the eyes. 4. Overlay sunglasses on the face using the center points of both eyes. 5. Return the overlaid image. overlay_image Function: Arguments: background: Background image foreground: Image to overlay location: Location to overlay the image Functionality: 1. Overlay sunglasses on the background image. 2. The transparent part of the sunglasses does not affect the background image. 3. Return the overlaid image. Process Description: 1. Load Haar Cascades: Load Haar Cascade classifiers from the files 2. Load Sunglasses Image: Load the sunglasses image from the 'sunglasses.png' file. 3. Start Webcam Capture: Open the webcam using OpenCV and begin reading frames. 4. Frame Processing: Converts the frame to grayscale and resizes it. Utilizes the Haar Cascade classifier to detect faces in the frame. Locates eyes around the detected face and calculates their center points. Overlays sunglasses on the face using the center points of the eyes. 5. Handle Keyboard Input If the 'q' key is pressed, the program exits. Command: python finalcode.py Result: