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
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 #include <fsdk/IPointBatch.h>
11 
12 namespace fsdk {
13 
14 #ifndef DOXYGEN_SHOULD_SKIP_THIS
15  DECLARE_SMARTPTR(ICrowdEstimator);
16 #endif
17 
30  CET_COUNT
31  };
32 
37  struct CrowdEstimation {
38  size_t count;
39  IPointBatchPtr points;
40  };
41 
56  };
57 
69  const Image& image,
70  const Rect& rect,
71  CrowdEstimation& estimation,
72  EstimationRequest request = EstimationRequest::estimateHeadCount) const noexcept = 0;
73 
87  virtual Result<FSDKError> estimate(
88  Span<const Image> images,
89  Span<const Rect> rects,
90  Span<CrowdEstimation> estimations,
91  EstimationRequest request = EstimationRequest::estimateHeadCount) const noexcept = 0;
92 
105  virtual Result<FSDKError> validate(
106  Span<const Image> images,
107  Span<const Rect> rects,
108  Span<Result<FSDKError>> errors,
109  EstimationRequest request = EstimationRequest::estimateHeadCount) const noexcept = 0;
110 
116  virtual CrowdEstimatorType getType() const noexcept = 0;
117  };
118 
120 } // namespace fsdk
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
virtual CrowdEstimatorType getType() const noexcept=0
Returns a type of the estimator.
Get number of peoples (heads)
Definition: ICrowdEstimator.h:54
Crowd estimation structure.
Definition: ICrowdEstimator.h:37
size_t count
The number of peoples (heads) on the image.
Definition: ICrowdEstimator.h:38
Common SDK error codes.
virtual Result< FSDKError > estimate(const Image &image, const Rect &rect, CrowdEstimation &estimation, EstimationRequest request=EstimationRequest::estimateHeadCount) const noexcept=0
Estimates the crowd on the target image.
Single network mode - only Crowd estimation will be used.
Definition: ICrowdEstimator.h:28
Base strong reference counted object interface.
Definition: IRefCounted.h:37
Default type which is specified in config file.
Definition: ICrowdEstimator.h:27
Common SDK definitions.
Double network mode - Crowd + HeadDetector.
Definition: ICrowdEstimator.h:29
Crowd estimator interface.
Definition: ICrowdEstimator.h:48
Image.
Definition: Image.h:38
EstimationRequest
EstimationRequest lists all possible estimation types that ICrowdEstimator can estimate.
Definition: ICrowdEstimator.h:53
Get number of people (heads) and head coordinates.
Definition: ICrowdEstimator.h:55
FSDKError
Common SDK error codes.
Definition: FSDKError.h:17
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Rect > rects, Span< Result< FSDKError >> errors, EstimationRequest request=EstimationRequest::estimateHeadCount) const noexcept=0
Validate input of multiple frames in a single function call.
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
IPointBatchPtr points
Coordinates of people heads. Empty if not requested.
Definition: ICrowdEstimator.h:39
Reference counted object interface.
CrowdEstimatorType
CrowdEstimator type enumeration.
Definition: ICrowdEstimator.h:26