CountFace

Functionality Detects and counts faces in an image using OpenCV’s Haar Cascade model.

Input - Image Path: Set during initialization or via set_image_path().

Example: image_path = 'data/gang.jpg'.

Output - Face Count: Returns the number of detected faces and prints the count. - Visual Display: Highlights detected faces on the image and displays it in a window.

Error Handling - Alerts if the image path is missing or invalid. - Displays an error if the image cannot be loaded.