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

face detector interface. More...

#include <IDetector.h>

Inheritance diagram for fsdk::IDetector:
fsdk::IRefCounted

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< FSDKErrorFSDK_DEPRECATED ("This call is deprecated since v.3.9.3. Consider ""redetect(\n""\tconst Span<Face>& faces,\n""\tDetectionType type,\n""\tconst Span<Result<FSDKError>>& outErrors) call.\n") redetect(const Span< Face > &faces
 Batched redetect faces. More...
 
virtual Result< FSDKErrorredetect (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

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 virtualnoexcept

Detect faces and landmarks on multiple images.

Parameters
imagesinput images span; format must be R8G8B8.
rectanglesinput rectangles of interest span.
detectionPerImageNummax number of detections per input image.
typetype 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.
virtual ResultValue<FSDKError, Face> fsdk::IDetector::detectOne ( const Image image,
const Rect rect,
DetectionType  type = dtBBox 
)
pure virtualnoexcept

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

Parameters
imageinput image
rectrectangle of interest on image
typetype of detection: BBox, 5landmarks or 68landmarks
Returns
ResultValue with error code and a Face object (detection bbox, landmarks, etc)
virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::OrientationType> fsdk::IDetector::estimateOrientation ( const Image image)
pure virtualnoexcept

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

Parameters
inputimage
Note
useOrientation param should be turned on in config
Supported only for FaceDetV3
virtual Result<FSDKError> fsdk::IDetector::FSDK_DEPRECATED ( "This call is deprecated since v.3.9.3. Consider ""redetect(\n""\tconst Span<Face>& faces,\n""\tDetectionType type,\n""\tconst Span<Result<FSDKError>>& outErrors) call.\n"  ) 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.
typetype 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.
virtual Result<FSDKError> fsdk::IDetector::redetect ( const fsdk::Span< fsdk::Face > &  faces,
fsdk::DetectionType  type,
const fsdk::Span< fsdk::Result< fsdk::FSDKError >> &  outErrors 
)
pure virtualnoexcept

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.
typetype 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.
virtual ResultValue<FSDKError, bool> fsdk::IDetector::redetectOne ( Face face,
DetectionType  type = dtBBox 
)
pure virtualnoexcept
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)
virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::Face> fsdk::IDetector::redetectOne ( const fsdk::Image image,
const fsdk::FloatRect rect,
fsdk::DetectionType  type = fsdk::dtBBox 
)
pure virtualnoexcept

Redetect face.

Parameters
imageinput image. Format must be R8G8B8.
rectrectangle of interest on image.
typetype of detection: BBox, 5landmarks or 68landmarks
Returns
ResultValue with ErrorCode and Face
virtual void fsdk::IDetector::setCustomDetectionComparer ( const IDetectionComparer comparer)
pure virtualnoexcept

Set custom detection comparer object.

Parameters
pointerto user defined comparer object
Note
Client code still owns comparer object
virtual void fsdk::IDetector::setDetectionComparer ( DetectionComparerType  comparerType)
pure virtualnoexcept

Set detection comparer from SDK defined list.

Parameters
comparerType

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