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

Public Member Functions | Public Attributes | List of all members
fsdk::IDetector Struct Referenceabstract
Object detector.

face detector interface. More...

`#include <IDetector.h>`

Inheritance diagram for fsdk::IDetector:

## Public Member Functions
virtual ResultValue< FSDKError, Ref< IResultBatch< Face > > > | detect (const Span< const Image > images, const Span< const Rect > rectangles, int detectionPerImageNum, DetectionType type=dtBBox) noexcept=0
| Detect faces and landmarks on multiple images. More...
virtual ResultValue< FSDKError, Face > | detectOne (const Image &image, const Rect &rect, DetectionType type=dtBBox) noexcept=0
| Light function to get just one best detection from single input image. More...
virtual void | setDetectionComparer (DetectionComparerType comparerType) noexcept=0
| Set detection comparer from SDK defined list. More...
virtual void | setCustomDetectionComparer (const IDetectionComparer *comparer) noexcept=0
| Set custom detection comparer object. More...
virtual ResultValue< FSDKError, bool > | redetectOne (Face &face, DetectionType type=dtBBox) noexcept=0
virtual fsdk::ResultValue< fsdk::FSDKError, fsdk::Face > | redetectOne (const fsdk::Image &image, const fsdk::FloatRect &rect, fsdk::DetectionType type=fsdk::dtBBox) noexcept=0
| Redetect face. More...
virtual Result< FSDKError > | FSDK_DEPRECATED ("This call is deprecated since v.3.9.3. Consider " "redetect(\ "\const Span< Face > &faces,\" "\DetectionType type,\" "\const Span< Result< FSDKError >> &outErrors) call.\") redetect(const Span< Face > &faces
| Batched redetect faces. More...
virtual Result< FSDKError > | redetect (const fsdk::Span< fsdk::Face > &faces, fsdk::DetectionType type, const fsdk::Span< fsdk::Result< fsdk::FSDKError >> &outErrors) noexcept=0
| Batched redetect faces. More...
virtual fsdk::ResultValue< fsdk::FSDKError, fsdk::OrientationType > | estimateOrientation (const Image &image) noexcept=0
| Estimate orientation of all image (Normal, Right90deg, Left90deg or UpsideDown). More...
Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t | retain () noexcept=0
| Increase strong reference count. More...
virtual int32_t | release () noexcept=0
| Decrease strong reference count. More...
virtual int32_t | getRefCount () const noexcept=0
| Get actual strong reference count. More...
virtual int32_t | retainWeak () noexcept=0
| Increase weak reference count. More...
virtual int32_t | releaseWeak () noexcept=0
| Decrease weak reference count. More...
virtual int32_t | getWeakRefCount () const noexcept=0
| Get actual weak reference count. More...

## Public Attributes
virtual Result< FSDKError > DetectionType | type = dtBBox
virtual Result< FSDKError > DetectionType const Span< FSDKError > * | outErrors = nullptr) noexcept = 0

## Detailed Description

face detector interface.

## Member Function Documentation

## ◆ detect()

virtual ResultValue<FSDKError, Ref<IResultBatch<Face> > > fsdk::IDetector::detect | ( | const Span< const Image > | images,
|  | const Span< const Rect > | rectangles,
|  | int | detectionPerImageNum,
|  | DetectionType | type = `dtBBox`
| ) |  |
| pure virtual noexcept

Detect faces and landmarks on multiple images.

Parameters

  images | input images span; format must be R8G8B8.
  rectangles | input rectangles of interest span.
  detectionPerImageNum | max number of detections per input image.
  type | type of detection: BBox, 5landmarks or 68landmarks.

Returns
  ResultValue with error code and collections of Face objects (detection bbox, landmarks, etc).

Note
  all spans should be based on user owned continuous collections.
  all spans should be equal size.

## ◆ detectOne()

virtual ResultValue<FSDKError, Face> fsdk::IDetector::detectOne | ( | const Image & | image,
|  | const Rect & | rect,
|  | DetectionType | type = `dtBBox`
| ) |  |
| pure virtual noexcept

Light function to get just one best detection from single input image.

Parameters

  image | input image
  rect | rectangle of interest on image
  type | type of detection: BBox, 5landmarks or 68landmarks

Returns
  ResultValue with error code and a Face object (detection bbox, landmarks, etc)

## ◆ estimateOrientation()

virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::OrientationType> fsdk::IDetector::estimateOrientation | ( | const Image & | image | ) |
| pure virtual noexcept

Estimate orientation of all image (Normal, Right90deg, Left90deg or UpsideDown).

Parameters

  input | image

Note
  `useOrientation` param should be turned on in config
  Supported only for FaceDetV3

## ◆ FSDK_DEPRECATED()

virtual Result<FSDKError> fsdk::IDetector::FSDK_DEPRECATED | ( | "This call is deprecated since v.3.9.3. Consider " "redetect(\ "\const Span< Face > &faces,\" "\DetectionType type,\" "\const Span< Result< FSDKError >> &outErrors) call.\" |  | ) | const &
| virtual

Batched redetect faces.

Parameters

  faces[in,out] | input Faces arrayView based on user owned continuous collection. Faces will be overwritten; If new faces were not found input Face will overwritten to InvalidFace. Use isValid() method to check.
  type | type of detection: BBox, 5landmarks or 68landmarks
  outErrors | [out] output span with errors codes corresponds to each face in input span. outError have to be the same size with faces input span size.

Returns
  ErrorCode. Returns Ok if redetections for all input faces was done with Ok error code. Returns BatchedInternalError if at least one redetection was done with Error. See outErrors for error detail for each input face.

## ◆ redetect()

virtual Result<FSDKError> fsdk::IDetector::redetect | ( | const fsdk::Span< fsdk::Face > & | faces,
|  | fsdk::DetectionType | type,
|  | const fsdk::Span< fsdk::Result< fsdk::FSDKError >> & | outErrors
| ) |  |
| pure virtual noexcept

Batched redetect faces.

Parameters

  faces[in,out] | input Faces arrayView based on user owned continuous collection. Faces will be overwritten; If new faces were not found input Faces will overwritten to InvalidFace. Use isValid() method to check.
  type | type of detection: BBox, 5landmarks or 68landmarks
  outErrors | [out] output span of results of errors codes corresponds to each face in input span. outErrors have to be the same size as faces input span size.

Note
  If you do not want to get span of results of errors please pass empty span.

Returns
  ErrorCode. Returns Ok if redetections for all input faces was done with Ok error code. Returns BatchedInternalError if at least one redetection was done with Error. See outErrors for error detail for each input face.

## ◆ redetectOne() [1/2]

virtual ResultValue<FSDKError, bool> fsdk::IDetector::redetectOne | ( | Face & | face,
|  | DetectionType | type = `dtBBox`
| ) |  |
| pure virtual noexcept

Parameters

  face | [in,out] Face object with initialised detection and img fields; Face will be overridden. If new detection was not find, Face object will be spoiled.
  type | [in] type of detection: BBox, 5landmarks or 68landmarks

Returns
  ResultValue with ErrorCode and bool (true - if detection found)

## ◆ redetectOne() [2/2]

virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::Face> fsdk::IDetector::redetectOne | ( | const fsdk::Image & | image,
|  | const fsdk::FloatRect & | rect,
|  | fsdk::DetectionType | type = `fsdk::dtBBox`
| ) |  |
| pure virtual noexcept

Redetect face.

Parameters

  image | input image. Format must be R8G8B8.
  rect | rectangle of interest on image.
  type | type of detection: BBox, 5landmarks or 68landmarks

Returns
  ResultValue with ErrorCode and Face

## ◆ setCustomDetectionComparer()

virtual void fsdk::IDetector::setCustomDetectionComparer | ( | const IDetectionComparer * | comparer | ) |
| pure virtual noexcept

Set custom detection comparer object.

Parameters

  pointer | to user defined comparer object

Note
  Client code still owns comparer object

## ◆ setDetectionComparer()

virtual void fsdk::IDetector::setDetectionComparer | ( | DetectionComparerType | comparerType | ) |
| pure virtual noexcept

Set detection comparer from SDK defined list.

Parameters

  comparerType |

The documentation for this struct was generated from the following file:

- include/fsdk/IDetector.h