Face Engine SDK  5.17.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 <fsdk/FSDKError.h>
4 #include <fsdk/IHumanDetectionBatch.h>
5 #include <fsdk/IObject.h>
6 #include <fsdk/Types/Human.h>
7 
8 #include <fsdk/vlc/future.h>
9 
10 namespace fsdk {
11 
12 #ifndef DOXYGEN_SHOULD_SKIP_THIS
13  DECLARE_SMARTPTR(IHumanDetector);
14 #endif
15 
25  HDT_BOX = 0,
26  HDT_POINTS = 1<<0,
27  HDT_ALL = 0xffff
28  };
29 
30  inline HumanDetectionType operator | (HumanDetectionType a, HumanDetectionType b) {
31  return static_cast<HumanDetectionType>(static_cast<int>(a) | static_cast<int>(b));
32  }
33 
51  detect(
52  Span<const Image> images,
53  Span<const Rect> rects,
54  uint32_t detectionPerImageNum,
55  HumanDetectionType type = HDT_BOX) const noexcept = 0;
56 
67  detectOne(
68  const Image& image,
69  const Rect& rect,
70  HumanDetectionType type = HDT_BOX) const noexcept = 0;
71 
83  const Image& image,
84  const Detection& detection,
85  HumanDetectionType type = HDT_BOX) const noexcept = 0;
86 
104  redetect(
105  Span<const Image> images,
106  Ref<IHumanDetectionBatch> detectionBatch,
107  HumanDetectionType type = HDT_BOX) const noexcept = 0;
108 
125  redetect(
126  Span<const Image> images,
127  Span<Span<const Detection>> detections,
128  HumanDetectionType type = HDT_BOX) const noexcept = 0;
129 
142  virtual Result<FSDKError>
143  validate(
144  Span<const Image> images,
145  Span<const Rect> rects,
146  uint32_t detectionPerImageNum,
147  Span<Result<FSDKError>> errors) const noexcept = 0;
148 
161  virtual Result<FSDKError> validate(
162  Span<const Image> images,
163  Ref<IHumanDetectionBatch> detectionBatch,
164  Span<Result<FSDKError>> errors) const noexcept = 0;
165 
179  virtual Result<FSDKError>
180  validate(
181  Span<const Image> images,
182  Span<Span<const Detection>> detections,
183  Span<Span<Result<FSDKError>>> errors) const noexcept = 0;
184 
188  using HumanBatchFuture = vlc::future<IHumanDetectionBatchPtr>;
189 
206  Span<const Image> images,
207  Span<const Rect> rectangles,
208  uint32_t detectionPerImageNum,
209  HumanDetectionType type = HDT_BOX) const = 0;
210 
228  Span<const Image> images,
229  Ref<IHumanDetectionBatch> detectionBatch,
230  HumanDetectionType type = HDT_BOX) const = 0;
231 
249  Span<const Image> images,
250  Span<Span<const Detection>> detections,
251  HumanDetectionType type = HDT_BOX) const = 0;
252 
253  };
254 
257 }
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
Get all supported parameters.
Definition: IHumanDetector.h:27
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Rect > rects, uint32_t detectionPerImageNum, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
virtual HumanBatchFuture redetectAsync(Span< const Image > images, Ref< IHumanDetectionBatch > detectionBatch, HumanDetectionType type=HDT_BOX) const =0
Asynchronously redetects human bodies on multiple images based on the detection results for the previ...
virtual HumanBatchFuture detectAsync(Span< const Image > images, Span< const Rect > rectangles, uint32_t detectionPerImageNum, HumanDetectionType type=HDT_BOX) const =0
Asynchronously detects human bodies on multiple images.
vlc::future< IHumanDetectionBatchPtr > HumanBatchFuture
Common alias for IHumanDetector asynchronous interface.
Definition: IHumanDetector.h:188
Smart pointer for reference counted objects.
Definition: Ref.h:26
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...
Base strong reference counted object interface.
Definition: IRefCounted.h:37
human body detector interface.
Definition: IHumanDetector.h:37
virtual ResultValue< FSDKError, IHumanDetectionBatchPtr > detect(Span< const Image > images, Span< const Rect > rects, uint32_t detectionPerImageNum, HumanDetectionType type=HDT_BOX) const noexcept=0
Batched detect of human bodies.
Get bounding boxes of human bodies.
Definition: IHumanDetector.h:25
Get bounding boxes of human bodies with 17 scored keypoints.
Definition: IHumanDetector.h:26
virtual ResultValue< FSDKError, Human > redetectOne(const Image &image, const Detection &detection, HumanDetectionType type=HDT_BOX) const noexcept=0
redetect one person from input image.
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
Image.
Definition: Image.h:38
HumanDetectionType
Human detection type enumeration.
Definition: IHumanDetector.h:24
virtual ResultValue< FSDKError, Human > detectOne(const Image &image, const Rect &rect, HumanDetectionType type=HDT_BOX) const noexcept=0
Detect one person on input image.
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