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

IBackgroundEstimator.h
1 #pragma once
2
3 #include <fsdk/IObject.h>
4 #include <fsdk/FSDKError.h>
5
6 #include <fsdk/Types/Image.h>
7 #include <fsdk/Types/Result.h>
8 #include <fsdk/Types/Span.h>
9
10 namespace fsdk {
11
12 #ifndef DOXYGEN_SHOULD_SKIP_THIS
13 DECLARE_SMARTPTR(IBackgroundEstimator);
14 #endif
15
20 enum class BackgroundStatus : uint8_t {
21 NonSolid = 0,
22 Solid = 1
23 };
24
31 struct BackgroundEstimation {
32 BackgroundStatus status;
33 float backgroundScore;
34 float backgroundColorScore;
35 };
36
41 struct IBackgroundEstimator : IRefCounted {
42
52 virtual Result<FSDKError>
53 estimate(
54 const Image& image,
55 const Detection& detection,
56 BackgroundEstimation& estimation) const noexcept = 0;
57
69 virtual Result<FSDKError>
70 estimate(
71 Span<const Image> images,
72 Span<const Detection> detections,
73 Span<BackgroundEstimation> estimations) const noexcept = 0;
74
86 virtual Result<FSDKError>
87 validate(
88 Span<const Image> images,
89 Span<const Detection> detection,
90 Span<Result<FSDKError>> errors) const noexcept = 0;
91 };
92
93 } // 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::BackgroundStatus::Solid
Solid.
IObject.h
Object system types and interfaces.
fsdk::BackgroundEstimation
Background estimator output structure. This structure contains the result of estimation and probabili...
Definition: IBackgroundEstimator.h:31
FSDKError.h
Common SDK error codes.
fsdk::BackgroundStatus::NonSolid
NonSolid.
fsdk::BackgroundStatus
BackgroundStatus
Background estimator output enum. This enum contains all possible estimation results.
Definition: IBackgroundEstimator.h:20
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::BackgroundEstimation::status
BackgroundStatus status
estimation result (
Definition: IBackgroundEstimator.h:32
fsdk::Image
Image.
Definition: Image.h:38
fsdk::BackgroundEstimation::backgroundScore
float backgroundScore
numerical value in range [0, 1], where 1 - is uniform background, 0 - is non uniform.
Definition: IBackgroundEstimator.h:33
fsdk::IBackgroundEstimator
Background estimator interface.
Definition: IBackgroundEstimator.h:41
fsdk::IBackgroundEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Detection > detection, Span< Result< FSDKError >> errors) const noexcept=0
Validates input of multiple frames in a single function call.
fsdk::IBackgroundEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, const Detection &detection, BackgroundEstimation &estimation) const noexcept=0
Estimates background status probability.
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
fsdk::BackgroundEstimation::backgroundColorScore
float backgroundColorScore
numerical value in range [0, 1], where 1 - is light background, 0 - is too dark.
Definition: IBackgroundEstimator.h:34