3 #include <fsdk/Types/Rect.h>
29 , m_w{
static_cast<int>(rect.x + rect.width)}
30 , m_h{
static_cast<int>(rect.y + rect.height)}
43 , m_w{width}, m_h{height}
54 , m_w{imageRect.x + imageRect.width}, m_h{imageRect.y + imageRect.height}
62 , m_score{rhs.m_score}
69 m_score = rhs.m_score;
98 float getScore() const noexcept {
117 return m_rect.
isValid() && m_score && m_w && m_h;
FloatRect getRawRect() const noexcept
Returns a raw detection bounding box.
Definition: Detection.h:85
void setScore(float score) noexcept
Sets a detection score.
Definition: Detection.h:107
bool isValid() const noexcept
Checks whether a detection is valid.
Definition: Detection.h:116
Detection(FloatRect rect, float score=1.f) noexcept
Special constructor based on raw rect and score only.
Definition: Detection.h:27
bool isValid() const noexcept
Checks whether a rect is valid.
Definition: Rect.h:378
Detection() noexcept
Default constructor. Creates an invalid Detection with zeroed rect and score.
Definition: Detection.h:14
Detection(FloatRect rect, int width, int height, float score=1.f) noexcept
Constructor base on the raw rect, bounding width and height.
Definition: Detection.h:41
Detection(FloatRect rect, Rect imageRect, float score=1.f) noexcept
Constructor base on the raw rect, bounding width and height.
Definition: Detection.h:52
void setRawRect(fsdk::FloatRect rect) noexcept
Sets a detection rect.
Definition: Detection.h:94
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
Rect getRect() const noexcept
Returns a detection rect.
Definition: Detection.h:77