Face Engine SDK  5.21.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_ALL = 0xffff
27  };
28 
30  return static_cast<HumanDetectionType>(static_cast<int>(a) | static_cast<int>(b));
31  }
32 
51  Span<const Image> images,
52  Span<const Rect> rects,
53  uint32_t detectionPerImageNum,
54  HumanDetectionType type = HDT_BOX) const noexcept = 0;
55 
66  detectOne(const Image& image, const Rect& rect, HumanDetectionType type = HDT_BOX) const noexcept = 0;
67 
79  const Image& image,
80  const Detection& detection,
81  HumanDetectionType type = HDT_BOX) const noexcept = 0;
82 
100  Span<const Image> images,
101  Ref<IHumanDetectionBatch> detectionBatch,
102  HumanDetectionType type = HDT_BOX) const noexcept = 0;
103 
122  Span<const Image> images,
123  Span<Span<const Detection>> detections,
124  HumanDetectionType type = HDT_BOX) const noexcept = 0;
125 
138  virtual Result<FSDKError> validate(
139  Span<const Image> images,
140  Span<const Rect> rects,
141  uint32_t detectionPerImageNum,
142  Span<Result<FSDKError>> errors) const noexcept = 0;
143 
156  virtual Result<FSDKError> validate(
157  Span<const Image> images,
158  Ref<IHumanDetectionBatch> detectionBatch,
159  Span<Result<FSDKError>> errors) const noexcept = 0;
160 
175  virtual Result<FSDKError> validate(
176  Span<const Image> images,
177  Span<Span<const Detection>> detections,
178  Span<Span<Result<FSDKError>>> errors) const noexcept = 0;
179 
183  using HumanBatchFuture = vlc::future<IHumanDetectionBatchPtr>;
184 
201  Span<const Image> images,
202  Span<const Rect> rectangles,
203  uint32_t detectionPerImageNum,
204  HumanDetectionType type = HDT_BOX) const = 0;
205 
223  Span<const Image> images,
224  Ref<IHumanDetectionBatch> detectionBatch,
225  HumanDetectionType type = HDT_BOX) const = 0;
226 
245  Span<const Image> images,
246  Span<Span<const Detection>> detections,
247  HumanDetectionType type = HDT_BOX) const = 0;
248  };
249 
252 } // namespace fsdk
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
Get all supported parameters.
Definition: IHumanDetector.h:26
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:183
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:36
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
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