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

Loading...
Searching...
No Matches
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
fsdk::Span
Span. @detail Not owning data view. It incapsulated pointer to the continuous array with one or more ...
Definition Span.h:14
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition Def.h:56
fsdk
SDK namespace.
Definition IAGSEstimator.h:8
fsdk::Detection
Detection structure. @detail Stores a detected bounding box within a source image rect.
Definition Detection.h:10
fsdk::EyesEstimation
Eyes estimation output.
Definition IEyeEstimator.h:23
fsdk::GazeEstimation
Gaze estimation output.
Definition IGazeEstimator.h:25
fsdk::IRefCounted
Base strong reference counted object interface.
Definition IRefCounted.h:37
fsdk::IWarper
Face detection area warper interface.
Definition IWarper.h:38
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.
fsdk::IWarper::warp
virtual Result< FSDKError > warp(Span< const Image > images, Span< const Transformation > transformations, Span< Image > transformedImages) const noexcept=0
Warp faces on multiple images.
fsdk::IWarper::warpAsync
virtual ImageBatchFuture warpAsync(Span< const Image > images, Span< const Transformation > transformations) const =0
Asynchronously warp faces on multiple images.
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 coordinates.
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 coordinates.
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::createTransformation
virtual Transformation createTransformation(const Detection &detection, const Landmarks5 &landmarks) const noexcept=0
Create transformation data struct.
fsdk::IWarper::ImageBatch
std::vector< Image > ImageBatch
Common aliases for IWarper asynchronous interface.
Definition IWarper.h:168
fsdk::IWarper::warp
virtual Result< FSDKError > warp(const Landmarks68 &landmarks68, const Transformation &transformation, Landmarks68 &transformedLandmarks68) const noexcept=0
Warp landmarks of size 68.
fsdk::Image
Image.
Definition Image.h:38
fsdk::Landmarks
Face landmarks template structure.
Definition Landmarks.h:23
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition Result.h:27
fsdk::Transformation
Transformation data structure, used for warping.
Definition Transformation.h:12