How prsntmaurya/object-detection works
Main Components
• Face Detection Module: Represents the functionality for detecting human faces and eyes using Haar cascade classifiers. This module includes loading the pre-trained XML files (haarcascade_frontalface_alt.xml, haarcascade_frontalface_default.xml, and haarcascade_eye_tree_eyeglasses.xml), building the cascade classifiers, detecting faces, then detecting eyes for each face.
• Jellyfish Detection Module: Represents the functionality for detecting jellyfish. It uses blob detection algorithms to find regions with a homogeneous intensity pattern and computes centroids as detection points.
• Input/Output Handling: Even though these are relatively simple one-off command-line utilities, show the flow of input images (like “oscarSelfie.jpg” or “jellyfish.jpg”) and corresponding output images (in the results directory) for each module.
• Underlying Libraries & Dependencies: Clearly indicate the use of C++ and OpenCV (version 3.0 and above). Optionally, show the role of pkg-config for handling compiler flags and linking.
Architectural Patterns & Design Principles
• Modularity: Even though the project’s code is simple and separated by problem (each in distinct C++ files inside Section1), show a clear separation of concerns where each detection problem is self-contained.
• Reusability: Indicate that both modules use OpenCV’s high-level functionalities (e.g., cascade classifiers, blob detection) and have a similar structure for processing input images.
Technologies, Frameworks, and Tools
• Mention the XML configuration files explicitly for the face detection component.
Detailed Elements
• A labeled component for “Face Detection” showing:
▪ Loading Haar Cascade XML files.
▪ Initializing and running classifier detection.
▪ Sub-step for eye detection within detected face regions.
• A labeled component for “Jellyfish Detection” showing:
▪ Setting blob detection parameters.
▪ Performing keypoint detection and centroid calculation.
• A shared “I/O” region where:
▪ Input images are provided.
▪ The processed output images are produced in the results folder.
• Connections with technology annotations (e.g., using OpenCV libraries for processing).