Face Engine SDK  5.17.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IWarper.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <fsdk/IDescriptor.h>
11 #include <fsdk/Types/Span.h>
12 #include <fsdk/Types/Transformation.h>
13 
14 #include <fsdk/vlc/future.h>
15 
16 namespace fsdk {
17  struct EyesEstimation;
18  struct GazeEstimation;
19 }
20 
21 namespace fsdk {
22 
23 #ifndef DOXYGEN_SHOULD_SKIP_THIS
24  DECLARE_SMARTPTR(IWarper);
25 #endif
26 
37  struct IWarper : IRefCounted {
45  virtual Transformation
47  const Detection& detection,
48  const Landmarks5& landmarks) const noexcept = 0;
49 
59  virtual Result<FSDKError>
60  warp(
61  const Image& image,
62  const Transformation& transformation,
63  Image& transformedImage) const noexcept = 0;
64 
82  virtual Result<FSDKError>
83  warp(
84  Span<const Image> images,
85  Span<const Transformation> transformations,
86  Span<Image> transformedImages) const noexcept = 0;
87 
98  virtual Result<FSDKError>
99  warp(
100  const Landmarks5& landmarks,
101  const Transformation& transformation,
102  Landmarks5& transformedLandmarks) const noexcept = 0;
103 
114  virtual Result<FSDKError>
115  warp(
116  const Landmarks68& landmarks68,
117  const Transformation& transformation,
118  Landmarks68& transformedLandmarks68) const noexcept = 0;
119 
131  virtual Result<FSDKError>
132  unwarp(
133  const EyesEstimation& eyesEstimationInWarpCoordinates,
134  const Transformation& transformation,
135  EyesEstimation& eyesEstimation) const noexcept = 0;
136 
145  virtual Result<FSDKError>
146  unwarp(
147  const Landmarks5& warpedLandmarks5,
148  const Transformation& transformation,
149  Landmarks5& landmarks5) const noexcept = 0;
150 
159  virtual Result<FSDKError>
160  unwarp(
161  const Landmarks68& warpedLandmarks68,
162  const Transformation& transformation,
163  Landmarks68& landmarks68) const noexcept = 0;
164 
165  virtual Result<FSDKError>
166  unwarp(
167  const GazeEstimation& warpedAngles,
168  const Transformation& transformation,
169  GazeEstimation& angles
170  ) const noexcept = 0;
171 
175  using ImageBatch = std::vector<Image>;
176  using ImageBatchFuture = vlc::future<ImageBatch>;
177 
190  virtual ImageBatchFuture warpAsync(
191  Span<const Image> images,
192  Span<const Transformation> transformations) const = 0;
193  };
195 }
Transformation data structure, used for warping.
Definition: Transformation.h:12
#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
Face landmarks template structure.
Definition: Landmarks.h:23
Face detection area warper interface.
Definition: IWarper.h:37
Eyes estimation output.
Definition: IEyeEstimator.h:23
Base strong reference counted object interface.
Definition: IRefCounted.h:37
virtual Transformation createTransformation(const Detection &detection, const Landmarks5 &landmarks) const noexcept=0
Create transformation data struct.
virtual Result< FSDKError > unwarp(const EyesEstimation &eyesEstimationInWarpCoordinates, const Transformation &transformation, EyesEstimation &eyesEstimation) const noexcept=0
Warp irisLandmarks in EyesEstimation struct for both eyes.
Descriptor extractor and matcher interfaces.
virtual Result< FSDKError > warp(const Image &image, const Transformation &transformation, Image &transformedImage) const noexcept=0
Warp image.
Image.
Definition: Image.h:38
virtual ImageBatchFuture warpAsync(Span< const Image > images, Span< const Transformation > transformations) const =0
Asynchronously warp faces on multiple images.
std::vector< Image > ImageBatch
Common aliases for IWarper asynchronous interface.
Definition: IWarper.h:175
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14