| Face Engine SDK 5.2.0 A face detection, recognition and tracking engine.

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
23 enum HumanDetectionType {
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
36 struct IHumanDetector : IRefCounted {
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 */
49 virtual ResultValue<FSDKError, Ref<IHumanDetectionBatch>>
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 **/
63 virtual ResultValue<FSDKError, Human>
64 redetectOne(
65 const Image& image,
66 const Detection& detection,
67 HumanDetectionType type = HDT_BOX) const noexcept = 0;
68
78 virtual Result<FSDKError>
79 validate(
80 Span<const Image> images,
81 Span<const Rect> rects,
82 uint32_t detectionPerImageNum,
83 Span<Result<FSDKError>> outErrors) const noexcept = 0;
84 };
85
88 }
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk::HDT_ALL
Get all supported parameters.
Definition: IHumanDetector.h:26
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
IObject.h
Object system types and interfaces.
FSDKError.h
Common SDK error codes.
fsdk::IHumanDetector::validate
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.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::IHumanDetector
human body detector interface.
Definition: IHumanDetector.h:36
fsdk::HDT_BOX
Get bounding boxes of human bodies.
Definition: IHumanDetector.h:24
fsdk::HDT_POINTS
Get 17 keypoints of human, with score for each one.
Definition: IHumanDetector.h:25
fsdk::ResultValue
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
fsdk::Image
Image.
Definition: Image.h:37
fsdk::HumanDetectionType
HumanDetectionType
Human detection type enumeration.
Definition: IHumanDetector.h:23
fsdk::Detection
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
fsdk::Span
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14