Face Engine SDK 5.25.0
A face detection, recognition and tracking engine.
Loading...
Searching...
No Matches
fsdk::IWarper Struct Referenceabstract

Face detection area warper interface. More...

#include <IWarper.h>

Inheritance diagram for fsdk::IWarper:
fsdk::IRefCounted

Public Types

using ImageBatch = std::vector<Image>
 Common aliases for IWarper asynchronous interface.
 
using ImageBatchFuture = vlc::future<ImageBatch>
 

Public Member Functions

virtual Transformation createTransformation (const Detection &detection, const Landmarks5 &landmarks) const noexcept=0
 Create transformation data struct.
 
virtual Result< FSDKErrorwarp (const Image &image, const Transformation &transformation, Image &transformedImage) const noexcept=0
 Warp image.
 
virtual Result< FSDKErrorwarp (Span< const Image > images, Span< const Transformation > transformations, Span< Image > transformedImages) const noexcept=0
 Warp faces on multiple images.
 
virtual Result< FSDKErrorwarp (const Landmarks5 &landmarks, const Transformation &transformation, Landmarks5 &transformedLandmarks) const noexcept=0
 Warp landmarks of size 5.
 
virtual Result< FSDKErrorwarp (const Landmarks68 &landmarks68, const Transformation &transformation, Landmarks68 &transformedLandmarks68) const noexcept=0
 Warp landmarks of size 68.
 
virtual Result< FSDKErrorunwarp (const EyesEstimation &eyesEstimationInWarpCoordinates, const Transformation &transformation, EyesEstimation &eyesEstimation) const noexcept=0
 Warp irisLandmarks in EyesEstimation struct for both eyes.
 
virtual Result< FSDKErrorunwarp (const Landmarks5 &warpedLandmarks5, const Transformation &transformation, Landmarks5 &landmarks5) const noexcept=0
 Warp landmarks of size 5 back to source image coordinates.
 
virtual Result< FSDKErrorunwarp (const Landmarks68 &warpedLandmarks68, const Transformation &transformation, Landmarks68 &landmarks68) const noexcept=0
 Warp landmarks of size 68 back to source image coordinates.
 
virtual Result< FSDKErrorunwarp (const GazeEstimation &warpedAngles, const Transformation &transformation, GazeEstimation &angles) const noexcept=0
 
virtual ImageBatchFuture warpAsync (Span< const Image > images, Span< const Transformation > transformations) const =0
 Asynchronously warp faces on multiple images.
 
- Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t retain () noexcept=0
 Increase strong reference count.
 
virtual int32_t retainLocked () noexcept=0
 Increase strong reference count thread safely.
 
virtual int32_t release () noexcept=0
 Decrease strong reference count.
 
virtual int32_t getRefCount () const noexcept=0
 Get actual strong reference count.
 
virtual int32_t retainWeak () noexcept=0
 Increase weak reference count.
 
virtual int32_t releaseWeak () noexcept=0
 Decrease weak reference count.
 
virtual int32_t getWeakRefCount () const noexcept=0
 Get actual weak reference count.
 

Detailed Description

Face detection area warper interface.

Perform affine transformations on an image to properly align depicted face for descriptor extraction.

Member Function Documentation

◆ createTransformation()

virtual Transformation fsdk::IWarper::createTransformation ( const Detection & detection,
const Landmarks5 & landmarks ) const
pure virtualnoexcept

Create transformation data struct.

Parameters
[in]detectiondetection coordinates in image space.
[in]landmarksvector of landmarks to calculate warping angles.
Returns
Transformation object.
See also
Transformation, Detection and Landmarks5 for details.

◆ unwarp() [1/3]

virtual Result< FSDKError > fsdk::IWarper::unwarp ( const EyesEstimation & eyesEstimationInWarpCoordinates,
const Transformation & transformation,
EyesEstimation & eyesEstimation ) const
pure virtualnoexcept

Warp irisLandmarks in EyesEstimation struct for both eyes.

Warps from warped image coord. space to source image coordinates space, the one that was used to create transformation.

Parameters
[in]eyesEstimationInWarpCoordinatesEyesEstimation straight out of EyeEstimator. Should be create from warpedImage, that was created with the same transformation object as the one passed.
[in]transformationtransformation data.
[out]eyesEstimationeyes estimation with iris landmarks warped to source image coordinates space.
Returns
Result with error code.
See also
Transformation, EyesEstimation, Result and FSDKError for details.

◆ unwarp() [2/3]

virtual Result< FSDKError > fsdk::IWarper::unwarp ( const Landmarks5 & warpedLandmarks5,
const Transformation & transformation,
Landmarks5 & landmarks5 ) const
pure virtualnoexcept

Warp landmarks of size 5 back to source image coordinates.

Parameters
[in]warpedLandmarks5warped landmarks array of size 5.
[in]transformationtransformation data.
[out]landmarks5landmarks of size 5 warped back to source image coordinates.
Returns
Result with error code.
See also
Transformation, Landmarks5, Result and FSDKError for details.

◆ unwarp() [3/3]

virtual Result< FSDKError > fsdk::IWarper::unwarp ( const Landmarks68 & warpedLandmarks68,
const Transformation & transformation,
Landmarks68 & landmarks68 ) const
pure virtualnoexcept

Warp landmarks of size 68 back to source image coordinates.

Parameters
[in]warpedLandmarks5warped landmarks array of size 68.
[in]transformationtransformation data.
[out]landmarks5landmarks of size 68 warped back to source image coordinates.
Returns
Result with error code.
See also
Transformation, Landmarks68, Result and FSDKError for details.

◆ warp() [1/4]

virtual Result< FSDKError > fsdk::IWarper::warp ( const Image & image,
const Transformation & transformation,
Image & transformedImage ) const
pure virtualnoexcept

Warp image.

Parameters
[in]imagesource image.
[in]transformationtransformation data.
[out]transformedImageoutput transformed image.
Returns
Result with error code.
See also
Transformation, Image, Result and FSDKError for details.
Note
image format must be R8G8B8,
See also
Format.

◆ warp() [2/4]

virtual Result< FSDKError > fsdk::IWarper::warp ( const Landmarks5 & landmarks,
const Transformation & transformation,
Landmarks5 & transformedLandmarks ) const
pure virtualnoexcept

Warp landmarks of size 5.

Parameters
[in]landmarkslandmarks array of size 5
[in]transformationtransformation data.
[out]transformedLandmarksoutput transformed landmarks. If transformation is created with detection, it's in the coordinates of transformed warped image, otherwise in the coordinates of detection.
Returns
Result with error code.
See also
Transformation, Landmarks5, Result and FSDKError for details.

◆ warp() [3/4]

virtual Result< FSDKError > fsdk::IWarper::warp ( const Landmarks68 & landmarks68,
const Transformation & transformation,
Landmarks68 & transformedLandmarks68 ) const
pure virtualnoexcept

Warp landmarks of size 68.

Parameters
[in]landmarks68landmarks to warp.
[in]transformationtransformation data.
[out]transformedLandmarks68output transformed landmarks of size 68. If transformation is created with detection, it's in the coordinates of transformed warped image, otherwise in the coordinates of detection.
Returns
Result with error code.
See also
Transformation, Landmarks68, Result and FSDKError for details.

◆ warp() [4/4]

virtual Result< FSDKError > fsdk::IWarper::warp ( Span< const Image > images,
Span< const Transformation > transformations,
Span< Image > transformedImages ) const
pure virtualnoexcept

Warp faces on multiple images.

Parameters
[in]imagesspan of source images.
[in]transformationsspan of transformation structures.
[in/out]transformedImages span of output warped images.
Note
: all input images must have the same memory residence.
: Each entry index in transformations span corresponds to the same index in images span to make warps from(i.e. transformations[i] <--> images[i]), so if there are multiple warps on the same image then this image must be duplicated in images span in order for the first statement to hold true.
: Despite the memory placement of transformed Images the new memory for output images will be allocated.
Returns
Result with error code.
See also
Span, Transformation, Image, Result and FSDKError for details.
Note
images format must be R8G8B8,
See also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.

◆ warpAsync()

virtual ImageBatchFuture fsdk::IWarper::warpAsync ( Span< const Image > images,
Span< const Transformation > transformations ) const
pure virtual

Asynchronously warp faces on multiple images.

Parameters
[in]imagesspan of source images.
[in]transformationsspan of transformation structures.
Returns
Future result object with error code and warped image batch.
See also
Span, Transformation, Image, Result and FSDKError for details.
Note
images format must be R8G8B8,
See also
Format.
Note
all spans should be based on user owned continuous collections.
all spans should be equal size.
this method is experimental and interface may be changed in the future.
this method is not marked as noexcept and may throw an exception.

The documentation for this struct was generated from the following file: