Cpp-Processing
CelanturDetection.h
1 #pragma once
2 #include <opencv2/core.hpp>
3 #include <string>
4 #include <optional>
5 
6 namespace celantur {
20  CelanturDetection() = default;
21  CelanturDetection(const CelanturDetection &) = default;
23  CelanturDetection &operator=(const CelanturDetection &) = default;
24  CelanturDetection &operator=(CelanturDetection &&) = default;
25  bool operator==(const CelanturDetection &other) const;
28  int class_id{0};
30  std::string class_name{};
32  float confidence{0.0};
34  cv::Rect box{};
38  std::optional<cv::Mat> segm_mask{std::nullopt};
39 
40  int get_area() const;
41  };
42 
43 }
Definition: CelanturDetection.h:6
Structure to hold information about a detection made by the Celantur SDK.
Definition: CelanturDetection.h:18
std::string class_name
Human-readable class name like "face" or "license_plate".
Definition: CelanturDetection.h:30
int class_id
Celantur class ID.
Definition: CelanturDetection.h:28
std::optional< cv::Mat > segm_mask
Optional segmentation mask for the detection, if available.
Definition: CelanturDetection.h:38
int model_class_id
Model-specific class ID, which may differ from the Celantur class ID; not needed to the end user.
Definition: CelanturDetection.h:36
cv::Rect box
Bounding box of the detection in the format (x, y, width, height)
Definition: CelanturDetection.h:34
float confidence
Confidence score of the detection, between 0 and 1 (1 means 100% confidence)
Definition: CelanturDetection.h:32