Face Engine SDK  5.21.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/FSDKError.h>
11 #include <fsdk/IRefCounted.h>
12 #include <fsdk/Types.h>
13 
14 #include <fsdk/vlc/future.h>
15 
16 namespace fsdk {
17  struct EyesEstimation;
18  struct GazeEstimation;
19 } // namespace fsdk
20 
21 namespace fsdk {
22 
23 #ifndef DOXYGEN_SHOULD_SKIP_THIS
24  DECLARE_SMARTPTR(IWarper);
25 #endif
26 
38  struct IWarper : IRefCounted {
46  virtual Transformation
47  createTransformation(const Detection& detection, const Landmarks5& landmarks) const noexcept = 0;
48 
58  virtual Result<FSDKError> warp(
59  const Image& image,
60  const Transformation& transformation,
61  Image& transformedImage) const noexcept = 0;
62 
81  virtual Result<FSDKError> warp(
82  Span<const Image> images,
83  Span<const Transformation> transformations,
84  Span<Image> transformedImages) const noexcept = 0;
85 
96  virtual Result<FSDKError> warp(
97  const Landmarks5& landmarks,
98  const Transformation& transformation,
99  Landmarks5& transformedLandmarks) const noexcept = 0;
100 
111  virtual Result<FSDKError> warp(
112  const Landmarks68& landmarks68,
113  const Transformation& transformation,
114  Landmarks68& transformedLandmarks68) const noexcept = 0;
115 
129  virtual Result<FSDKError> unwarp(
130  const EyesEstimation& eyesEstimationInWarpCoordinates,
131  const Transformation& transformation,
132  EyesEstimation& eyesEstimation) const noexcept = 0;
133 
142  virtual Result<FSDKError> unwarp(
143  const Landmarks5& warpedLandmarks5,
144  const Transformation& transformation,
145  Landmarks5& landmarks5) const noexcept = 0;
146 
155  virtual Result<FSDKError> unwarp(
156  const Landmarks68& warpedLandmarks68,
157  const Transformation& transformation,
158  Landmarks68& landmarks68) const noexcept = 0;
159 
160  virtual Result<FSDKError> unwarp(
161  const GazeEstimation& warpedAngles,
162  const Transformation& transformation,
163  GazeEstimation& angles) const noexcept = 0;
164 
168  using ImageBatch = std::vector<Image>;
169  using ImageBatchFuture = vlc::future<ImageBatch>;
170 
183  virtual ImageBatchFuture
184  warpAsync(Span<const Image> images, Span<const Transformation> transformations) const = 0;
185  };
186 
188 } // namespace fsdk
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
Common data types and structures.
Face landmarks template structure.
Definition: Landmarks.h:23
Face detection area warper interface.
Definition: IWarper.h:38
Common SDK error codes.
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.
virtual Result< FSDKError > warp(const Image &image, const Transformation &transformation, Image &transformedImage) const noexcept=0
Warp image.
Gaze estimation output.
Definition: IGazeEstimator.h:25
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:168
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
Reference counted object interface.