Face Engine SDK  5.33.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ISubjectiveQualityEstimator.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 
8 namespace fsdk {
9 
10 #ifndef DOXYGEN_SHOULD_SKIP_THIS
11  DECLARE_SMARTPTR(ISubjectiveQualityEstimator);
12 #endif
13 
34  float blur;
35  float light;
36  float darkness;
37  float illumination;
38  float specularity;
39  bool isBlurred;
40  bool isHighlighted;
41  bool isDark;
42  bool isIlluminated;
43  bool isNotSpecular;
44 
48  inline bool isGood() const noexcept;
49  };
50 
74  virtual Result<FSDKError> estimate(const Image& warp, SubjectiveQuality& quality) const noexcept = 0;
75 
86  virtual Result<FSDKError>
87  estimate(Span<const Image> warps, Span<SubjectiveQuality> quality) const noexcept = 0;
88 
99  virtual Result<FSDKError>
100  validate(Span<const Image> warps, Span<Result<FSDKError>> errors) const noexcept = 0;
101  };
102 
103  /*
104  Implementation details.
105  */
106  bool SubjectiveQuality::isGood() const noexcept {
107  if(!isBlurred && !isHighlighted && !isDark && !isIlluminated && !isNotSpecular)
108  return true;
109  return false;
110  }
111 
113 } // 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
Common data types and structures.
Subjective Quality estimation structure Each estimation is given in normalized [0, 1] range. Parameter meanings:
Definition: ISubjectiveQualityEstimator.h:33
Object system types and interfaces.
Common SDK error codes.
Base strong reference counted object interface.
Definition: IRefCounted.h:37
virtual Result< FSDKError > estimate(const Image &warp, SubjectiveQuality &quality) const noexcept=0
Estimate the quality.
Image quality estimator interface.
Definition: ISubjectiveQualityEstimator.h:65
Image.
Definition: Image.h:38
bool isGood() const noexcept
Definition: ISubjectiveQualityEstimator.h:106
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.
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14