Detection structure. @detail Stores a detected bounding box within a source image rect.
More...
#include <Detection.h>
|
| Detection () noexcept |
| Default constructor. Creates an invalid Detection with zeroed rect and score.
|
|
| Detection (FloatRect rect, float score=1.f) noexcept |
| Special constructor based on raw rect and score only.
|
|
| Detection (FloatRect rect, int width, int height, float score=1.f) noexcept |
| Constructor base on the raw rect, bounding width and height.
|
|
| Detection (FloatRect rect, Rect imageRect, float score=1.f) noexcept |
| Constructor base on the raw rect, bounding width and height.
|
|
| Detection (const Detection &rhs) noexcept |
|
Detection & | operator= (const Detection &rhs) noexcept |
|
Rect | getRect () const noexcept |
| Returns a detection rect.
|
|
FloatRect | getRawRect () const noexcept |
| Returns a raw detection bounding box.
|
|
void | setRawRect (fsdk::FloatRect rect) noexcept |
| Sets a detection rect.
|
|
float | getScore () const noexcept |
|
void | setScore (float score) noexcept |
| Sets a detection score.
|
|
bool | isValid () const noexcept |
| Checks whether a detection is valid.
|
|
Detection structure. @detail Stores a detected bounding box within a source image rect.
◆ Detection() [1/3]
fsdk::Detection::Detection |
( |
FloatRect | rect, |
|
|
float | score = 1.f ) |
|
inlinenoexcept |
Special constructor based on raw rect and score only.
- Parameters
-
[in] | rect | raw detection rect. |
[in] | score | detection score. |
- Note
- * The input rect will be handled not only as a raw detection rect but as a bounding rect also.
◆ Detection() [2/3]
fsdk::Detection::Detection |
( |
FloatRect | rect, |
|
|
int | width, |
|
|
int | height, |
|
|
float | score = 1.f ) |
|
inlinenoexcept |
Constructor base on the raw rect, bounding width and height.
- Parameters
-
[in] | rect | raw detection rect. |
[in] | width | bounding source image rect width. |
[in] | height | bounding source image rect height. |
[in] | score | detection score. |
◆ Detection() [3/3]
fsdk::Detection::Detection |
( |
FloatRect | rect, |
|
|
Rect | imageRect, |
|
|
float | score = 1.f ) |
|
inlinenoexcept |
Constructor base on the raw rect, bounding width and height.
- Parameters
-
[in] | rect | raw detection rect. |
[in] | rect | bounding source image rect. |
◆ getRawRect()
FloatRect fsdk::Detection::getRawRect |
( |
| ) |
const |
|
inlinenoexcept |
Returns a raw detection bounding box.
- Note
- The raw detection area could be beyond the frame borders.
◆ getRect()
Rect fsdk::Detection::getRect |
( |
| ) |
const |
|
inlinenoexcept |
Returns a detection rect.
- Note
- This detection rect is alwais bounded by the frame borders.
◆ isValid()
bool fsdk::Detection::isValid |
( |
| ) |
const |
|
inlinenoexcept |
Checks whether a detection is valid.
A detection is considered valid if it has a valid rect and score in [0..1] range.
- Returns
- true if detection is valid, false otherwise.
◆ setRawRect()
Sets a detection rect.
- Note
- This method usefull for debug purpose. Otherwise it is not needed to change the internal rect in the Detection object.
◆ setScore()
void fsdk::Detection::setScore |
( |
float | score | ) |
|
|
inlinenoexcept |
Sets a detection score.
- Note
- This method usefull for debug purpose. Otherwise it is not needed to change the internal score in the Detection object.
The documentation for this struct was generated from the following file: