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;
SDK namespace.
Definition IAGSEstimator.h:8
Type x
Upper left corner x-coordinate.
Definition Rect.h:12
bool isValid() const noexcept
Checks whether a rect is valid.
Definition Rect.h:372
Detection structure. @detail Stores a detected bounding box within a source image rect.
Definition Detection.h:10
Detection() noexcept
Default constructor. Creates an invalid Detection with zeroed rect and score.
Definition Detection.h:14
Detection(FloatRect rect, float score=1.f) noexcept
Special constructor based on raw rect and score only.
Definition Detection.h:28
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
void setScore(float score) noexcept
Sets a detection score.
Definition Detection.h:110
void setRawRect(fsdk::FloatRect rect) noexcept
Sets a detection rect.
Definition Detection.h:97
Detection(FloatRect rect, Rect imageRect, float score=1.f) noexcept
Constructor base on the raw rect, bounding width and height.
Definition Detection.h:54
Rect getRect() const noexcept
Returns a detection rect.
Definition Detection.h:80
FloatRect getRawRect() const noexcept
Returns a raw detection bounding box.
Definition Detection.h:88
bool isValid() const noexcept
Checks whether a detection is valid.
Definition Detection.h:119