|
Cpp-Processing
|
Utilities to work with celantur::CelanturDetection. More...

Functions | |
| void | celantur::serialise_image_metrics_to_json (cv::Mat image, std::vector< CelanturDetection > detections, std::string image_name, std::string input_folder, std::ostream &os) |
| serialise detections to JSON format. Is identical to the celantur-container functionality. More... | |
| std::vector< CelanturDetection > | celantur::filter_detections_by_threshold (const std::vector< CelanturDetection > &detections, const ModelThresholds &thresholds) |
| Filter detections based on confidence thresholds for different object classes. This function takes a vector of CelanturDetection objects and filters them according to the specified thresholds for each class. More... | |
| std::vector< CelanturDetection > | celantur::filter_detections_by_class_name (const std::vector< CelanturDetection > &detections, const std::set< std::string > &classes) |
| Filter detections based on a set of class names. This function takes a vector of CelanturDetection objects and filters them to include only those whose class names are present in the provided set. More... | |
| std::vector< CelanturDetection > | celantur::filter_detections_by_class (const std::vector< CelanturDetection > &detections, const std::set< CelanturClassId > &classes) |
| Filter detections by type. This function takes a vector of CelanturDetection objects and filters them to include only those whose class IDs are present in the provided set. More... | |
| cv::Mat | celantur::visualise_detections (const cv::Mat image, std::vector< CelanturDetection > detections) |
| Visualise detections on an image. This function takes an input image and a vector of CelanturDetection objects, and draws bounding boxes and class labels on the image to visualize the detections. Can be used for debug purposes. More... | |
Utilities to work with celantur::CelanturDetection.
| std::vector< CelanturDetection > celantur::filter_detections_by_class | ( | const std::vector< CelanturDetection > & | detections, |
| const std::set< CelanturClassId > & | classes | ||
| ) |
Filter detections by type. This function takes a vector of CelanturDetection objects and filters them to include only those whose class IDs are present in the provided set.
| detections | The vector of CelanturDetection objects to be filtered. |
| classes | A set of CelanturClassId to filter by. |
References celantur::CelanturDetection::class_id.
| std::vector< CelanturDetection > celantur::filter_detections_by_class_name | ( | const std::vector< CelanturDetection > & | detections, |
| const std::set< std::string > & | classes | ||
| ) |
Filter detections based on a set of class names. This function takes a vector of CelanturDetection objects and filters them to include only those whose class names are present in the provided set.
| detections | The vector of CelanturDetection objects to be filtered. |
| classes | A set of class names to filter by. |
References celantur::CelanturDetection::class_name.
| std::vector< CelanturDetection > celantur::filter_detections_by_threshold | ( | const std::vector< CelanturDetection > & | detections, |
| const ModelThresholds & | thresholds | ||
| ) |
Filter detections based on confidence thresholds for different object classes. This function takes a vector of CelanturDetection objects and filters them according to the specified thresholds for each class.
| detections | The vector of CelanturDetection objects to be filtered. |
| thresholds | The ModelThresholds object containing the confidence thresholds for each class. |
References celantur::CelanturDetection::class_id, celantur::CelanturDetection::confidence, celantur::ModelThresholds::face, celantur::ModelThresholds::license_plate, celantur::ModelThresholds::person, and celantur::ModelThresholds::vehicle.
| void celantur::serialise_image_metrics_to_json | ( | cv::Mat | image, |
| std::vector< CelanturDetection > | detections, | ||
| std::string | image_name, | ||
| std::string | input_folder, | ||
| std::ostream & | os | ||
| ) |
serialise detections to JSON format. Is identical to the celantur-container functionality.
| image | The input image as a cv::Mat object. |
| detections | The vector of CelanturDetection objects to be serialized. |
| image_name | The name of the image (filename or custom identifier). |
| input_folder | The input folder path where the image is located. |
| os | The output stream where the JSON will be written. |
| cv::Mat celantur::visualise_detections | ( | const cv::Mat | image, |
| std::vector< CelanturDetection > | detections | ||
| ) |
Visualise detections on an image. This function takes an input image and a vector of CelanturDetection objects, and draws bounding boxes and class labels on the image to visualize the detections. Can be used for debug purposes.
| image | The input image as a cv::Mat object. |
| detections | The vector of CelanturDetection objects to be visualized. |
References celantur::CelanturDetection::box, celantur::CelanturDetection::class_name, and celantur::CelanturDetection::segm_mask.