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

IBlackWhiteEstimator.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(IBlackWhiteEstimator);
12 #endif
13
32 struct ImageColorEstimation {
33
34 float colorScore;
35 float infraredScore;
36
40 enum class ImageColorType : uint8_t {
41 Color = 0,
42 Grayscale,
43 Infrared,
44 };
45
46 ImageColorType colorType;
47 };
48
49 struct IBlackWhiteEstimator : IRefCounted {
58 FSDK_DEPRECATED("This method is deprecated since v.5.6.0, use estimation by warped image instead!")
59 virtual Result<FSDKError> estimate(const Image& image, bool& outIsGrayscale) const noexcept = 0;
60
69 virtual Result<FSDKError>
70 estimate(const Image& warp, ImageColorEstimation& estimation) const noexcept = 0;
71
82 virtual Result<FSDKError>
83 estimate(Span<const Image> warps, Span<ImageColorEstimation> estimations) const noexcept = 0;
84
95 virtual Result<FSDKError>
96 validate(Span<const Image> warps, Span<Result<FSDKError>> errors) const noexcept = 0;
97 };
98
100 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:70
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Types.h
Common data types and structures.
fsdk::ImageColorEstimation::colorScore
float colorScore
0(grayscale)..1(color);
Definition: IBlackWhiteEstimator.h:34
fsdk::IBlackWhiteEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, bool &outIsGrayscale) const noexcept=0
Check if image is grayscale or color.
IObject.h
Object system types and interfaces.
fsdk::IBlackWhiteEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > warps, Span< Result< FSDKError >> errors) const noexcept=0
Validates input of multiple frames in a single function call.
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
fsdk::ImageColorEstimation::ImageColorType
ImageColorType
Enumeration of possible image color types.
Definition: IBlackWhiteEstimator.h:40
fsdk::Image
Image.
Definition: Image.h:38
fsdk::ImageColorEstimation::ImageColorType::Grayscale
Image is grayscale.
fsdk::ImageColorEstimation::ImageColorType::Color
Image is color.
fsdk::IBlackWhiteEstimator
Definition: IBlackWhiteEstimator.h:49
fsdk::ImageColorEstimation
Image color type estimator interface.
Definition: IBlackWhiteEstimator.h:32
fsdk::ImageColorEstimation::ImageColorType::Infrared
Image is infrared.
fsdk::ImageColorEstimation::infraredScore
float infraredScore
0(infrared)..1(not infrared);
Definition: IBlackWhiteEstimator.h:35
fsdk::Span
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14