Face Engine SDK  5.3.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IHumanDetector.h
1 #pragma once
2 
3 #include "FSDKError.h"
4 #include "IHumanDetectionBatch.h"
5 #include "IObject.h"
6 #include "Types/Human.h"
7 
8 namespace fsdk {
9 
10 #ifndef DOXYGEN_SHOULD_SKIP_THIS
11  DECLARE_SMARTPTR(IHumanDetector);
12 #endif
13 
24  HDT_BOX = 0,
25  HDT_POINTS = 1<<0,
26  HDT_ALL = 0xffff
27  };
28 
29  inline HumanDetectionType operator | (HumanDetectionType a, HumanDetectionType b) {
30  return static_cast<HumanDetectionType>(static_cast<int>(a) | static_cast<int>(b));
31  }
32 
37  /*
38  * @brief Batched detect of human bodies
39  * @param images input images span; format must be R8G8B8.
40  * @param rects input rectangles of interest span.
41  * @param detectionPerImageNum max number of detections per input image.
42  * @param type Human detection type. @see HumanDetectionType for details.
43  * @return ResultValue with error code and IHumanDetectionBatch object.
44  * @note all spans should be based on user owned continuous collections.
45  * @note all spans should be equal size.
46  * @see ResultValue, FSDKError, Ref, IHumanDetectionBatch, Span,
47  * Image, Rect, HumanDetectionType for details
48  */
50  detect(
51  Span<const Image> images,
52  Span<const Rect> rects,
53  uint32_t detectionPerImageNum,
54  HumanDetectionType type = HDT_BOX) const noexcept = 0;
55 
56  /*
57  * @brief redetect one person from input image;
58  * @param image source image;
59  * @param detection detection to make a redetect;
60  * @param type Human detection type. @see HumanDetectionType for details.
61  * @return ResultValue with ErrorCode and Human (invalid - if detection not found);
62  **/
64  redetectOne(
65  const Image& image,
66  const Detection& detection,
67  HumanDetectionType type = HDT_BOX) const noexcept = 0;
68 
84  redetect(
85  Span<const Image> images,
86  Ref<IHumanDetectionBatch> detectionBatch,
87  HumanDetectionType type = HDT_BOX) const noexcept = 0;
88 
104  redetect(
105  Span<const Image> images,
106  Span<Span<const Detection>> detections,
107  HumanDetectionType type = HDT_BOX) const noexcept = 0;
108 
118  virtual Result<FSDKError>
119  validate(
120  Span<const Image> images,
121  Span<const Rect> rects,
122  uint32_t detectionPerImageNum,
123  Span<Result<FSDKError>> outErrors) const noexcept = 0;
124 
134  virtual Result<FSDKError> validate(
135  Span<const Image> images,
136  Ref<IHumanDetectionBatch> detectionBatch,
137  Span<Result<FSDKError>> outErrors) const noexcept = 0;
138 
149  virtual Result<FSDKError>
150  validate(
151  Span<const Image> images,
152  Span<Span<const Detection>> detections,
153  Span<Span<Result<FSDKError>>> errors) const noexcept = 0;
154 
155  };
156 
159 }
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
Get all supported parameters.
Definition: IHumanDetector.h:26
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Smart pointer for reference counted objects.
Definition: Ref.h:22
Object system types and interfaces.
Common SDK error codes.
virtual ResultValue< FSDKError, IHumanDetectionBatchPtr > redetect(Span< const Image > images, Ref< IHumanDetectionBatch > detectionBatch, HumanDetectionType type=HDT_BOX) const noexcept=0
Batched redetect humans on multiple images based on the detection results for the previous frames...
virtual Result< FSDKError > validate(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.
Base strong reference counted object interface.
Definition: IRefCounted.h:36
human body detector interface.
Definition: IHumanDetector.h:36
Get bounding boxes of human bodies.
Definition: IHumanDetector.h:24
Get 17 keypoints of human, with score for each one.
Definition: IHumanDetector.h:25
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
Image.
Definition: Image.h:37
HumanDetectionType
Human detection type enumeration.
Definition: IHumanDetector.h:23
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14