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

IWarper.h
Go to the documentation of this file.
1
8 #pragma once
9
10 #include "IDescriptor.h"
11
12 namespace fsdk {
13 struct EyesEstimation;
14 struct GazeEstimation;
15 }
16
17 namespace fsdk {
18
19 #ifndef DOXYGEN_SHOULD_SKIP_THIS
20 DECLARE_SMARTPTR(IWarper);
21 #endif
22
28 struct Transformation {
29 Vector2<float> centerP = {0, 0}; //From 0, scaled
30 float angleDeg = 0;
31 float scale = 0;
32 Vector2<int> detectionTopLeft = {0, 0}; //From 0, original size
33
34 bool isValid = false;
35 };
36
41 struct IWarper : IRefCounted {
47 virtual Transformation
48 createTransformation(
49 const Detection& detection,
50 const Landmarks5& landmarks) const noexcept = 0;
51
59 virtual Result<FSDKError>
60 warp(
61 const Image& image,
62 const Transformation& transformation,
63 Image& transformedImage) const noexcept = 0;
64
74 virtual Result<FSDKError>
75 warp(
76 const Landmarks5& landmarks,
77 const Transformation& transformation,
78 Landmarks5& transformedLandmarks) const noexcept = 0;
79
89 virtual Result<FSDKError>
90 warp(
91 const Landmarks68& landmarks68,
92 const Transformation& transformation,
93 Landmarks68& transformedLandmarks68) const noexcept = 0;
94
104 virtual Result<FSDKError>
105 unwarp(
106 const EyesEstimation& eyesEstimationInWarpCoordinates,
107 const Transformation& transformation,
108 EyesEstimation& eyesEstimation) const noexcept = 0;
109
117 virtual Result<FSDKError>
118 unwarp(
119 const Landmarks5& warpedLandmarks5,
120 const Transformation& transformation,
121 Landmarks5& landmarks5) const noexcept = 0;
122
130 virtual Result<FSDKError>
131 unwarp(
132 const Landmarks68& warpedLandmarks68,
133 const Transformation& transformation,
134 Landmarks68& landmarks68) const noexcept = 0;
135
136 virtual fsdk::Result<FSDKError>
137 unwarp(
138 const fsdk::GazeEstimation& warpedAngles,
139 const Transformation& transformation,
140 fsdk::GazeEstimation& angles
141 ) const noexcept = 0;
142 };
143
144 }
fsdk::IWarper::warp
virtual Result< FSDKError > warp(const Image &image, const Transformation &transformation, Image &transformedImage) const noexcept=0
Warp image.
fsdk::IWarper::unwarp
virtual Result< FSDKError > unwarp(const EyesEstimation &eyesEstimationInWarpCoordinates, const Transformation &transformation, EyesEstimation &eyesEstimation) const noexcept=0
Warp irisLandmarks in EyesEstimation struct for both eyes.
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk::IWarper::unwarp
virtual Result< FSDKError > unwarp(const Landmarks5 &warpedLandmarks5, const Transformation &transformation, Landmarks5 &landmarks5) const noexcept=0
Warp landmarks of size 5 back to source image coords.
fsdk::IWarper
Face detection area warper interface.
Definition: IWarper.h:41
fsdk::Vector2< float >
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Landmarks
Face landmarks template structure.
Definition: Landmarks.h:18
fsdk::IWarper::createTransformation
virtual Transformation createTransformation(const Detection &detection, const Landmarks5 &landmarks) const noexcept=0
Create transformation data struct.
fsdk::Result< FSDKError >
fsdk::EyesEstimation
Eyes estimation output.
Definition: IEyeEstimator.h:18
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IWarper::unwarp
virtual Result< FSDKError > unwarp(const Landmarks68 &warpedLandmarks68, const Transformation &transformation, Landmarks68 &landmarks68) const noexcept=0
Warp landmarks of size 68 back to source image coords.
fsdk::Transformation
Transformation data structure, used for warping.
Definition: IWarper.h:28
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::BaseDetection
Face detection. @detail Stores a detected face bounding box within a source image frame as well as de...
Definition: Detection.h:10
fsdk::IWarper::warp
virtual Result< FSDKError > warp(const Landmarks5 &landmarks, const Transformation &transformation, Landmarks5 &transformedLandmarks) const noexcept=0
Warp landmarks of size 5.
fsdk::IWarper::warp
virtual Result< FSDKError > warp(const Landmarks68 &landmarks68, const Transformation &transformation, Landmarks68 &transformedLandmarks68) const noexcept=0
Warp landmarks of size 68.
IDescriptor.h
Descriptor extractor and matcher interfaces.