| Face Engine SDK 5.2.0 A face detection, recognition and tracking engine.

Public Member Functions | List of all members
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. 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
Detection & | operator= (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. @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`
| ) |  |
| inline noexcept

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`
| ) |  |
| inline noexcept

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`
| ) |  |
| inline noexcept

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

Parameters

  [in] | rect | raw detection rect.
  [in] | rect | bounding source image rect.

## Member Function Documentation

## ◆ getRawRect()

FloatRect fsdk::Detection::getRawRect | ( |  | ) | const
| inline noexcept

Returns a raw detection bounding box.

Note
  The raw detection area could be beyond the frame borders.

## ◆ getRect()

Rect fsdk::Detection::getRect | ( |  | ) | const
| inline noexcept

Returns a detection rect.

Note
  This detection rect is alwais bounded by the frame borders.

## ◆ isValid()

bool fsdk::Detection::isValid | ( |  | ) | const
| inline noexcept

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 | ) |
| inline noexcept

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 | ) |
| inline noexcept

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:

- fsdk.framework/Headers/Types/Detection.h