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

ICrowdEstimator.h
1 #pragma once
2
3 #include <fsdk/Def.h>
4 #include <fsdk/FSDKError.h>
5 #include <fsdk/IRefCounted.h>
6 #include <fsdk/Types/Image.h>
7 #include <fsdk/Types/Ref.h>
8 #include <fsdk/Types/Result.h>
9 #include <fsdk/Types/Span.h>
10
11 namespace fsdk {
12
13 #ifndef DOXYGEN_SHOULD_SKIP_THIS
14 DECLARE_SMARTPTR(ICrowdEstimator);
15 #endif
16
20 enum CrowdEstimatorType {
21 CET_DEFAULT = 0,
22 CET_SINGLE_NET = 1,
23 CET_TWO_NETS = 2,
24 CET_COUNT
25 };
26
31 struct CrowdEstimation {
32 size_t count;
33 };
34
41 struct ICrowdEstimator : IRefCounted {
51 virtual Result<FSDKError>
52 estimate(
53 const Image& image,
54 const Rect& rect,
55 CrowdEstimation& estimation) const noexcept = 0;
56
69 virtual Result<FSDKError>
70 estimate(
71 Span<const Image> images,
72 Span<const Rect> rects,
73 Span<CrowdEstimation> estimations) const noexcept = 0;
74
86 virtual Result<FSDKError>
87 validate(
88 Span<const Image> images,
89 Span<const Rect> rects,
90 Span<Result<FSDKError>> errors) const noexcept = 0;
91
97 virtual CrowdEstimatorType
98 getType() const noexcept = 0;
99 };
100
101 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
fsdk::CET_SINGLE_NET
Single network mode - only Crowd estimation will be used.
Definition: ICrowdEstimator.h:22
fsdk::ICrowdEstimator::getType
virtual CrowdEstimatorType getType() const noexcept=0
Returns a type of the estimator.
fsdk::CrowdEstimation
Crowd estimation structure.
Definition: ICrowdEstimator.h:31
fsdk::CrowdEstimation::count
size_t count
The number of peoples (heads) on the image.
Definition: ICrowdEstimator.h:32
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::ICrowdEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, const Rect &rect, CrowdEstimation &estimation) const noexcept=0
Estimates the crowd on the target image.
Def.h
Common SDK definitions.
fsdk::CET_TWO_NETS
Double network mode - Crowd + HeadDetector.
Definition: ICrowdEstimator.h:23
fsdk::CET_DEFAULT
Default type which is specified in config file.
Definition: ICrowdEstimator.h:21
fsdk::ICrowdEstimator
Crowd estimator interface.
Definition: ICrowdEstimator.h:41
fsdk::Image
Image.
Definition: Image.h:38
fsdk::ICrowdEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Rect > rects, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::BaseRect< int >
fsdk::CrowdEstimatorType
CrowdEstimatorType
CrowdEstimator type enumeration.
Definition: ICrowdEstimator.h:20
fsdk::Span
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
IRefCounted.h
Reference counted object interface.