Face Engine SDK  5.8.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fsdk::Detection Struct Reference

Detection structure. Stores a detected bounding box within a source image rect. More...

#include <Detection.h>

Public Member Functions

 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. More...
 
 Detection (FloatRect rect, int width, int height, float score=1.f) noexcept
 Constructor base on the raw rect, bounding width and height. More...
 
 Detection (FloatRect rect, Rect imageRect, float score=1.f) noexcept
 Constructor base on the raw rect, bounding width and height. More...
 
 Detection (const Detection &rhs) noexcept
 
Detectionoperator= (const Detection &rhs) noexcept
 
Rect getRect () const noexcept
 Returns a detection rect. More...
 
FloatRect getRawRect () const noexcept
 Returns a raw detection bounding box. More...
 
void setRawRect (fsdk::FloatRect rect) noexcept
 Sets a detection rect. More...
 
float getScore () const noexcept
 
void setScore (float score) noexcept
 Sets a detection score. More...
 
bool isValid () const noexcept
 Checks whether a detection is valid. More...
 

Detailed Description

Detection structure. Stores a detected bounding box within a source image rect.

Constructor & Destructor Documentation

fsdk::Detection::Detection ( FloatRect  rect,
float  score = 1.f 
)
inlinenoexcept

Special constructor based on raw rect and score only.

Parameters
[in]rectraw detection rect.
[in]scoredetection score.
Note
* The input rect will be handled not only as a raw detection rect but as a bounding rect also.
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]rectraw detection rect.
[in]widthbounding source image rect width.
[in]heightbounding source image rect height.
[in]scoredetection score.
fsdk::Detection::Detection ( FloatRect  rect,
Rect  imageRect,
float  score = 1.f 
)
inlinenoexcept

Constructor base on the raw rect, bounding width and height.

Parameters
[in]rectraw detection rect.
[in]rectbounding source image rect.

Member Function Documentation

FloatRect fsdk::Detection::getRawRect ( ) const
inlinenoexcept

Returns a raw detection bounding box.

Note
The raw detection area could be beyond the frame borders.
Rect fsdk::Detection::getRect ( ) const
inlinenoexcept

Returns a detection rect.

Note
This detection rect is alwais bounded by the frame borders.
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.
void fsdk::Detection::setRawRect ( fsdk::FloatRect  rect)
inlinenoexcept

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.
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: