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::IDetector Struct Referenceabstract

face detector interface. More...

#include <IDetector.h>

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

Public Types

using FaceBatchResult = ResultValue< FSDKError, IFaceDetectionBatchPtr >
 Common aliases for IDetector asynchronous interface.
 
using FaceBatchFuture = vlc::future< IFaceDetectionBatchPtr >
 

Public Member Functions

virtual ResultValue< FSDKError,
Ref< IFaceDetectionBatch > > 
detect (Span< const Image > images, Span< const Rect > ROIs, uint32_t perImageNum, DetectionType type=DT_BBOX) noexcept=0
 Detect faces and their parameters on multiple images. More...
 
virtual ResultValue< FSDKError,
Face
detectOne (const Image &image, const Rect &rect, DetectionType type=DT_BBOX) noexcept=0
 Light function to get just one best detection from single input image. More...
 
virtual ResultValue< FSDKError,
Ref< IFaceDetectionBatch > > 
redetect (Span< const Image > images, Ref< IFaceDetectionBatch > detectionBatch, DetectionType type=DT_BBOX) noexcept=0
 Batched redetect faces on multiple images. based on the detection results for the previous frames. More...
 
virtual ResultValue< FSDKError,
Ref< IFaceDetectionBatch > > 
redetect (Span< const Image > images, Span< Span< const Detection >> detections, DetectionType type=DT_BBOX) noexcept=0
 Batched redetect faces on multiple images. based on the detection results for the previous frames. More...
 
virtual ResultValue< FSDKError,
Face
redetectOne (const Image &image, const Detection &detection, DetectionType type=DT_BBOX) noexcept=0
 Redetect face. 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 Result< FSDKErrorvalidate (Span< const Image > images, Span< Span< const Detection >> detections, Span< Span< Result< FSDKError >>> errors) const noexcept=0
 Validate input of multiple frames in a single function call. More...
 
virtual Result< FSDKErrorvalidate (Span< const Image > images, Span< const Rect > rects, uint32_t detectionPerImageNum, Span< Result< FSDKError >> outErrors) const noexcept=0
 Validate input of multiple frames in a single function call. More...
 
virtual Result< FSDKErrorvalidate (Span< const Image > images, Ref< IFaceDetectionBatch > detectionBatch, Span< Result< FSDKError >> outErrors) const noexcept=0
 Validate input of multiple frames in a single function call. More...
 
virtual FaceBatchFuture detectAsync (Span< const Image > images, Span< const Rect > rectangles, uint32_t perImageNum, DetectionType type=DT_BBOX) const =0
 Asynchronously detect faces and their parameters on multiple images. More...
 
virtual FaceBatchFuture redetectAsync (Span< const Image > images, IFaceDetectionBatchPtr detectionBatch, DetectionType type=DT_BBOX) const =0
 Asynchronously redetect faces on multiple images. based on the detection results for the previous frames. More...
 
- Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t retain () noexcept=0
 Increase strong reference count. More...
 
virtual int32_t retainLocked () noexcept=0
 Increase strong reference count thread safely. 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...
 

Detailed Description

face detector interface.

Member Function Documentation

virtual ResultValue<FSDKError, Ref<IFaceDetectionBatch> > fsdk::IDetector::detect ( Span< const Image images,
Span< const Rect ROIs,
uint32_t  perImageNum,
DetectionType  type = DT_BBOX 
)
pure virtualnoexcept

Detect faces and their parameters on multiple images.

Parameters
[in]imagesspan of source images.
[in]rectanglesinput rectangles of interest (ROI) span.
[in]perImageNumthe max number of detections per input image.
[in]typetype of the detection.
Returns
ResultValue with error code and IFaceDetectionBatch object.
See Also
Ref, Span, Image, Rect, DetectionType, IFaceDetectionBatch, ResultValue and FSDKError for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.
virtual FaceBatchFuture fsdk::IDetector::detectAsync ( Span< const Image images,
Span< const Rect rectangles,
uint32_t  perImageNum,
DetectionType  type = DT_BBOX 
) const
pure virtual

Asynchronously detect faces and their parameters on multiple images.

Parameters
[in]imagesspan of source images.
[in]rectanglesinput rectangles of interest (ROI) span.
[in]perImageNumthe max number of detections per input image.
[in]typetype of the detection.
Returns
Future ResultValue with error code and IFaceDetectionBatch object.
See Also
Ref, Span, Image, Rect, DetectionType, IFaceDetectionBatch, ResultValue, FSDKError and vlc::future for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.
this method is experimental and interface may be changed in the future.
this method is not marked as noexcept and may throw an exception.
virtual ResultValue<FSDKError, Face> fsdk::IDetector::detectOne ( const Image image,
const Rect rect,
DetectionType  type = DT_BBOX 
)
pure virtualnoexcept

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

Parameters
[in]imagesource image.
[in]rectrectangle of interest in the image.
[in]typetype of detection: BBox, 5landmarks or 68landmarks.
Returns
ResultValue with error code and a Face object (detection bbox, landmarks, etc).
See Also
Face, Image, Rect, DetectionType, ResultValue and FSDKError for details.
Note
image format must be R8G8B8,
See Also
Format.
virtual ResultValue<FSDKError, Ref<IFaceDetectionBatch> > fsdk::IDetector::redetect ( Span< const Image images,
Ref< IFaceDetectionBatch detectionBatch,
DetectionType  type = DT_BBOX 
)
pure virtualnoexcept

Batched redetect faces on multiple images. based on the detection results for the previous frames.

Parameters
[in]imagesspan of source images.
[in]detectionBatchresult of detection on the previous frames - Ref with an IFaceDetectionBatch object.
[in]typetype of redetection.
Returns
ResultValue with error code and IFaceDetectionBatch object.
See Also
Ref, Span, Image, DetectionType, IFaceDetectionBatch, ResultValue and FSDKError for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
images span should be the same size with detectionBatch size.
In case if some face from the input detectionBatch was not found the corresponding detection in the output IFaceDetectionBatch object will be invalid.
virtual ResultValue<FSDKError, Ref<IFaceDetectionBatch> > fsdk::IDetector::redetect ( Span< const Image images,
Span< Span< const Detection >>  detections,
DetectionType  type = DT_BBOX 
)
pure virtualnoexcept

Batched redetect faces on multiple images. based on the detection results for the previous frames.

Parameters
[in]imagesspan of source images.
[in]detectionsspan of detection coordinates in corresponding source images space from the previous frames. It is a two dimensional Span. There is one Span of the rectangles for each image.
[in]typetype of redetection.
Returns
ResultValue with error code and IFaceDetectionBatch object.
See Also
Ref, Span, Image, DetectionType, Detection, IFaceDetectionBatch, ResultValue and FSDKError for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.
If for some of the input detections the redetected face will not be found the appropriate detection in the IFaceDetectionBatch object will be invalid.
virtual FaceBatchFuture fsdk::IDetector::redetectAsync ( Span< const Image images,
IFaceDetectionBatchPtr  detectionBatch,
DetectionType  type = DT_BBOX 
) const
pure virtual

Asynchronously redetect faces on multiple images. based on the detection results for the previous frames.

Parameters
[in]imagesspan of source images.
[in]detectionBatchresult of detection on the previous frames - Ref with an IFaceDetectionBatch object.
[in]typetype of redetection.
Returns
Future ResultValue with error code and IFaceDetectionBatch object.
See Also
Ref, Span, Image, DetectionType, IFaceDetectionBatch, ResultValue, FSDKError and vlc::future for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
images span should be the same size with detectionBatch size.
In case if some face from the input detectionBatch was not found the corresponding detection in the output IFaceDetectionBatch object will be invalid.
this method is experimental and interface may be changed in the future.
this method is not marked as noexcept and may throw an exception.
virtual ResultValue<FSDKError, Face> fsdk::IDetector::redetectOne ( const Image image,
const Detection detection,
DetectionType  type = DT_BBOX 
)
pure virtualnoexcept

Redetect face.

Parameters
[in]imagesource image. Format must be R8G8B8.
[in]detectiondetection coordinates in image space from the previous frame to make redetect.
[in]typetype of detection: BBox, 5landmarks or 68landmarks.
Returns
ResultValue with error code and Face.
See Also
Face, Image, DetectionType, Detection, ResultValue and FSDKError for details.
Note
image format must be R8G8B8,
See Also
Format.
virtual void fsdk::IDetector::setCustomDetectionComparer ( const IDetectionComparer comparer)
pure virtualnoexcept

Set custom detection comparer object.

Parameters
[in]comparerpointer to user defined comparer object.
See Also
IDetectionComparer for details.
Note
Client code still owns comparer object
virtual void fsdk::IDetector::setDetectionComparer ( DetectionComparerType  comparerType)
pure virtualnoexcept

Set detection comparer from SDK defined list.

Parameters
[in]comparerTypetype of the comparer for detections.
See Also
DetectionComparerType for details.
virtual Result<FSDKError> fsdk::IDetector::validate ( Span< const Image images,
Span< Span< const Detection >>  detections,
Span< Span< Result< FSDKError >>>  errors 
) const
pure virtualnoexcept

Validate input of multiple frames in a single function call.

Parameters
[in]imagesspan of source images.
[in]detectionsspan of detection coordinates in corresponding source images space from the previous frames. It is a two dimensional Span. There is one Span of Detections for each image.
[out]errorsoutput span of errors for each image. It is a two dimensional Span. There is one Span of the errors for each image.
Returns
Result with error code.
See Also
Span, Image, Detection, Result and FSDKError for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.
virtual Result<FSDKError> fsdk::IDetector::validate ( Span< const Image images,
Span< const Rect rects,
uint32_t  detectionPerImageNum,
Span< Result< FSDKError >>  outErrors 
) const
pure virtualnoexcept

Validate input of multiple frames in a single function call.

Parameters
[in]imagesspan of source images.
[in]rectsspan of rectangle coordinates of corresponding source images.
[in]detectionPerImageNummax number of detections per input image.
[out]errorsoutput span of errors for each image.
Returns
Result with error code.
See Also
Span, Image, Rect, Result and FSDKError for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.
virtual Result<FSDKError> fsdk::IDetector::validate ( Span< const Image images,
Ref< IFaceDetectionBatch detectionBatch,
Span< Result< FSDKError >>  outErrors 
) const
pure virtualnoexcept

Validate input of multiple frames in a single function call.

Parameters
[in]imagesspan of source images.
[in]detectionBatchresult of detection on the previous frames - Ref with an IFaceDetectionBatch object.
[out]errorsoutput span of errors for each image.
Returns
Result with error code.
See Also
Ref, Span, Image, IFaceDetectionBatch, Result and FSDKError for details.
Note
images format must be R8G8B8,
See Also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.

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