3 #include <fsdk/Types/Rect.h>
30 , m_w{
static_cast<int>(rect.x + rect.width)}
31 , m_h{
static_cast<int>(rect.y + rect.height)}
56 , m_w{imageRect.x + imageRect.width}
57 , m_h{imageRect.y + imageRect.height}
65 , m_score{rhs.m_score} {
72 m_score = rhs.m_score;
101 float getScore() const noexcept {
120 return m_rect.
isValid() && m_score && m_w && m_h;
FloatRect getRawRect() const noexcept
Returns a raw detection bounding box.
Definition: Detection.h:88
void setScore(float score) noexcept
Sets a detection score.
Definition: Detection.h:110
bool isValid() const noexcept
Checks whether a detection is valid.
Definition: Detection.h:119
Detection(FloatRect rect, float score=1.f) noexcept
Special constructor based on raw rect and score only.
Definition: Detection.h:28
bool isValid() const noexcept
Checks whether a rect is valid.
Definition: Rect.h:372
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:42
Detection(FloatRect rect, Rect imageRect, float score=1.f) noexcept
Constructor base on the raw rect, bounding width and height.
Definition: Detection.h:54
void setRawRect(fsdk::FloatRect rect) noexcept
Sets a detection rect.
Definition: Detection.h:97
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:80