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
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 
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 
66  detectOne(
67  const Image& image,
68  const Rect& rect,
69  HumanDetectionType type = HDT_BOX) const noexcept = 0;
70 
82  const Image& image,
83  const Detection& detection,
84  HumanDetectionType type = HDT_BOX) const noexcept = 0;
85 
103  redetect(
104  Span<const Image> images,
105  Ref<IHumanDetectionBatch> detectionBatch,
106  HumanDetectionType type = HDT_BOX) const noexcept = 0;
107 
124  redetect(
125  Span<const Image> images,
126  Span<Span<const Detection>> detections,
127  HumanDetectionType type = HDT_BOX) const noexcept = 0;
128 
141  virtual Result<FSDKError>
142  validate(
143  Span<const Image> images,
144  Span<const Rect> rects,
145  uint32_t detectionPerImageNum,
146  Span<Result<FSDKError>> errors) const noexcept = 0;
147 
160  virtual Result<FSDKError> validate(
161  Span<const Image> images,
162  Ref<IHumanDetectionBatch> detectionBatch,
163  Span<Result<FSDKError>> errors) const noexcept = 0;
164 
178  virtual Result<FSDKError>
179  validate(
180  Span<const Image> images,
181  Span<Span<const Detection>> detections,
182  Span<Span<Result<FSDKError>>> errors) const noexcept = 0;
183 
184  };
185 
188 }
#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
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.
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: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
virtual ResultValue< FSDKError, Human > redetectOne(const Image &image, const Detection &detection, HumanDetectionType type=HDT_BOX) const noexcept=0
redetect one person from input image.
virtual ResultValue< FSDKError, Ref< IHumanDetectionBatch > > detect(Span< const Image > images, Span< const Rect > rects, uint32_t detectionPerImageNum, HumanDetectionType type=HDT_BOX) const noexcept=0
Batched detect of human bodies.
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:25
Image.
Definition: Image.h:38
HumanDetectionType
Human detection type enumeration.
Definition: IHumanDetector.h:23
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