Face Engine SDK 5.25.0
A face detection, recognition and tracking engine.
Loading...
Searching...
No Matches
fsdk::Detection Struct Reference

Detection structure. @detail 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.
 
 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
 
Detectionoperator= (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.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Detection() [1/3]

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.

◆ 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]rectraw detection rect.
[in]widthbounding source image rect width.
[in]heightbounding source image rect height.
[in]scoredetection 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]rectraw detection rect.
[in]rectbounding source image rect.

Member Function Documentation

◆ 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()

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.

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