Face Engine SDK  5.15.0
A face detection, recognition and tracking engine.
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 namespace fsdk {
9 
10 #ifndef DOXYGEN_SHOULD_SKIP_THIS
11  DECLARE_SMARTPTR(IHumanDetector);
12 #endif
13 
23  HDT_BOX = 0,
24  HDT_POINTS = 1<<0,
25  HDT_ALL = 0xffff
26  };
27 
28  inline HumanDetectionType operator | (HumanDetectionType a, HumanDetectionType b) {
29  return static_cast<HumanDetectionType>(static_cast<int>(a) | static_cast<int>(b));
30  }
31 
50  Span<const Image> images,
51  Span<const Rect> rects,
52  uint32_t detectionPerImageNum,
53  HumanDetectionType type = HDT_BOX) const noexcept = 0;
54 
66  const Image& image,
67  const Rect& rect,
68  HumanDetectionType type = HDT_BOX) const noexcept = 0;
69 
81  const Image& image,
82  const Detection& detection,
83  HumanDetectionType type = HDT_BOX) const noexcept = 0;
84 
103  Span<const Image> images,
104  Ref<IHumanDetectionBatch> detectionBatch,
105  HumanDetectionType type = HDT_BOX) const noexcept = 0;
106 
124  Span<const Image> images,
125  Span<Span<const Detection>> detections,
126  HumanDetectionType type = HDT_BOX) const noexcept = 0;
127 
140  virtual Result<FSDKError>
142  Span<const Image> images,
143  Span<const Rect> rects,
144  uint32_t detectionPerImageNum,
145  Span<Result<FSDKError>> errors) const noexcept = 0;
146 
160  Span<const Image> images,
161  Ref<IHumanDetectionBatch> detectionBatch,
162  Span<Result<FSDKError>> errors) const noexcept = 0;
163 
177  virtual Result<FSDKError>
179  Span<const Image> images,
180  Span<Span<const Detection>> detections,
181  Span<Span<Result<FSDKError>>> errors) const noexcept = 0;
182 
183  };
184 
187 }
fsdk::Span
Span. @detail Not owning data view. It incapsulated pointer to the continuous array with one or more ...
Definition: Span.h:15
fsdk::IHumanDetector::validate
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.
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::BaseRect< int >
fsdk::IHumanDetector::detectOne
virtual ResultValue< FSDKError, Human > detectOne(const Image &image, const Rect &rect, HumanDetectionType type=HDT_BOX) const noexcept=0
Detect one person on input image.
fsdk::IHumanDetector::validate
virtual Result< FSDKError > validate(Span< const Image > images, Ref< IHumanDetectionBatch > detectionBatch, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::IHumanDetector
human body detector interface.
Definition: IHumanDetector.h:35
fsdk::IHumanDetector::detect
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.
fsdk::HDT_ALL
@ HDT_ALL
Get all supported parameters.
Definition: IHumanDetector.h:25
fsdk::HDT_BOX
@ HDT_BOX
Get bounding boxes of human bodies.
Definition: IHumanDetector.h:23
fsdk::HDT_POINTS
@ HDT_POINTS
Get bounding boxes of human bodies with 17 scored keypoints.
Definition: IHumanDetector.h:24
fsdk::IHumanDetector::redetect
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.
fsdk::Detection
Detection structure. @detail Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
fsdk::IHumanDetector::redetect
virtual ResultValue< FSDKError, IHumanDetectionBatchPtr > redetect(Span< const Image > images, Span< Span< const Detection >> detections, HumanDetectionType type=HDT_BOX) const noexcept=0
Batched redetect humans on multiple images based on the detection results for the previous frames.
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:30
fsdk::Image
Image.
Definition: Image.h:39
fsdk::Ref
Smart pointer for reference counted objects.
Definition: Ref.h:26
fsdk::IHumanDetector::validate
virtual Result< FSDKError > validate(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.
fsdk::IHumanDetector::redetectOne
virtual ResultValue< FSDKError, Human > redetectOne(const Image &image, const Detection &detection, HumanDetectionType type=HDT_BOX) const noexcept=0
redetect one person from input image.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::HumanDetectionType
HumanDetectionType
Human detection type enumeration.
Definition: IHumanDetector.h:22
fsdk::ResultValue
Addon for Result to output some value aside the result. Specialization for copiable types.
Definition: ResultValue.h:25