Skip to content

Image Warping#

Warping is the process of face image normalization. It requires landmarks and face detection (see chapter "Detection facility") to operate. The purpose of the process is to:

  • compensate image plane rotation (roll angle);
  • center the image using eye positions;
  • properly crop the image.

This way all warped images look the same and one can tell that, e.g., left eye is always in a box, defined by the certain coordinates. This way certain transform invariance is achieved for input data so various algorithms can perform better.

The warper (see IWarper in IWarper.h):

  • Implements the warp() function that accepts span of source fsdk::Image in R8B8G8 format, span of fsdk::Transformation and span of output fsdk::Image structures;
  • Implements the warpAsync() function that accepts span of source fsdk::Image in R8B8G8 format and span of fsdk::Transformation.

Note: Method warpAsync() is experimental, and it's interface may be changed in the future. Note: Method warpAsync() is not marked as noexcept and may throw an exception.

Face warping
Face warping

Be aware that image warping is not thread-safe, so you have to create a warper object per worker thread.