| Face Engine SDK 5.33.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
IQualityEstimator.h
1 #pragma once
2
3 #include <fsdk/IObject.h>
4 #include <fsdk/FSDKError.h>
5 #include <fsdk/Optional.h>
6 #include <fsdk/Types.h>
7 #include <fsdk/Estimators/ISubjectiveQualityEstimator.h>
8
9 namespace fsdk {
10
11 #ifndef DOXYGEN_SHOULD_SKIP_THIS
12 DECLARE_SMARTPTR(IQualityEstimator);
13 #endif
14
28 struct Quality {
29 float light;
30 float dark;
31 float gray;
32 float blur;
36 inline float getQuality() const noexcept;
37 };
38
53 struct IQualityEstimator : IRefCounted {
63 FSDK_DEPRECATED("This method is deprecated since v.5.32.0, use ISubjectiveQualityEstimator instead!")
64 virtual Result<FSDKError> estimate(const Image& warp, Quality& quality) const noexcept = 0;
65
76 FSDK_DEPRECATED("This method is deprecated since v.5.32.0, use ISubjectiveQualityEstimator instead!")
77 virtual Result<FSDKError> estimate(Span<const Image> warps, Span<Quality> quality) const noexcept = 0;
78
87 FSDK_DEPRECATED("This method is deprecated since v.5.32.0, use ISubjectiveQualityEstimator instead!")
88 virtual Result<FSDKError> estimate(const Image& warp, SubjectiveQuality& quality) const noexcept = 0;
89
100 FSDK_DEPRECATED("This method is deprecated since v.5.32.0, use ISubjectiveQualityEstimator instead!")
101 virtual Result<FSDKError>
102 estimate(Span<const Image> warps, Span<SubjectiveQuality> quality) const noexcept = 0;
103
114 FSDK_DEPRECATED("This method is deprecated since v.5.32.0, use ISubjectiveQualityEstimator instead!")
115 virtual Result<FSDKError>
116 validate(Span<const Image> warps, Span<Result<FSDKError>> errors) const noexcept = 0;
117 };
118
119 /*
120 Implementation details.
121 */
122 float Quality::getQuality() const noexcept {
123 float min1 = std::min(dark, light);
124 float min2 = std::min(gray, blur);
125 return std::min(min1, min2);
126 }
127
129 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Types.h
Common data types and structures.
fsdk::Quality
Quality estimation structure Each estimation is given in normalized [0, 1] range. Parameter meanings:...
Definition: IQualityEstimator.h:28
fsdk::SubjectiveQuality
Subjective Quality estimation structure Each estimation is given in normalized [0, 1] range. Parameter meanings:
Definition: ISubjectiveQualityEstimator.h:33
IObject.h
Object system types and interfaces.
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
fsdk::Quality::getQuality
float getQuality() const noexcept
Definition: IQualityEstimator.h:122
fsdk::IQualityEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, Quality &quality) const noexcept=0
Estimate the quality.
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IQualityEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > warps, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
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::IQualityEstimator
Image quality estimator interface.
Definition: IQualityEstimator.h:53