Face SDK  1.7 Mozart rc
Face Recognition Software Development Kit
Classes | Typedefs | Functions | Variables
Base

Classes

struct  face_sdk::matrix
 Matrix for affine transform, used by alignment_info class. More...
 
class  face_sdk::alignment_info
 Alignment info. Contains results of alignment. More...
 
class  face_sdk::exception
 Base FaceSDK exception class. Almost all exceptions that FaceSDK throws are inherits this class. More...
 
class  face_sdk::face
 The face object. Face object contains information about face bounding box on the image and the original image. More...
 
class  face_sdk::fir
 The FIR object. FIR - Face Identification Record, biometric template. More...
 
class  face_sdk::image
 The image object. An image keeps bitmap data in 24bpp RBG format. More...
 
class  face_sdk::license
 The license object. A license object provide information about your limits in face_sdk. See Licensing. More...
 
class  face_sdk::serializer
 The serializer object. The serializer object allows serialize and deserialize face_sdk::face, face_sdk::alignment_info, face_sdk::fir objects. More...
 
class  face_sdk::version_info
 The version_info class provides information about FaceSDK version. See Available algorightm versions and versions compability. More...
 
class  face_sdk::video_frame
 A video frame contains image and meta-information about this image in video stream context. More...
 
class  face_sdk::video_stream
 A video stream represents a sequence of frames. More...
 

Typedefs

typedef std::vector< std::shared_ptr< face_sdk::alignment_info > > face_sdk::alignment_info_set
 
typedef std::vector< std::shared_ptr< face_sdk::face > > face_sdk::face_set
 
typedef std::vector< std::shared_ptr< face_sdk::fir > > face_sdk::fir_set
 

Functions

bool FACE_SDK_EXPORT face_sdk::is_root_exception_of_type (const std::type_info &tp, const face_sdk::exception &e)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img)
 Make the face object and its bounding box size equal to the original image size. More...
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, bool out_of_bounds, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence)
 Make the face object with specified size and coordinates of bounding box. More...
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, bool out_of_bounds, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, const std::vector< std::tuple< int32_t, int32_t > > &landmarks)
 Make the face object with specified size and coordinates of bounding box and specified landmarks. More...
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, const std::vector< std::tuple< int32_t, int32_t > > &landmarks, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, const std::vector< std::tuple< int32_t, int32_t > > &landmarks, bool out_of_bounds, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, const std::vector< std::tuple< int32_t, int32_t > > &landmarks, const std::shared_ptr< image > &cropped_image)
 Make the face object with specified size and coordinates of bounding box and specified landmarks. More...
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, const std::vector< std::tuple< int32_t, int32_t > > &landmarks, const std::shared_ptr< image > &cropped_image, uint32_t version)
 
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT face_sdk::make_face (const std::shared_ptr< image > &img, int32_t x, int32_t y, int32_t width, int32_t height, float confidence, const std::vector< std::tuple< int32_t, int32_t > > &landmarks, const std::shared_ptr< image > &cropped_image, bool out_of_bounds, uint32_t version)
 
std::shared_ptr< fir > FACE_SDK_EXPORT face_sdk::convert_to_short_fir (const std::shared_ptr< face_sdk::fir > &long_fir)
 Converts firs with long data types to short.
 
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT face_sdk::load_image_from_file (const std::string &file_name)
 Load encoded image from file. Image must be in RBG or BRG channels order. Grayscale or images with alfa-channel not allowed.
More...
 
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT face_sdk::load_image_from_data (const std::uint8_t *data, int32_t data_size)
 Load encoded image from memory. More...
 
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT face_sdk::make_image_from_data (const std::uint8_t *data, std::uint32_t width, std::uint32_t height)
 Makes image object from bitmap. Bitmap must 24bpp RGB format. More...
 
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT face_sdk::make_image_from_data (const std::uint8_t *data, std::uint32_t width, std::uint32_t height, std::uint32_t stride)
 Makes image object from bitmap. Bitmap must 24bpp RGB format. More...
 
std::shared_ptr< face_sdk::license > FACE_SDK_EXPORT face_sdk::load_licence_from_file ()
 Load license from file in known paths. (see Known paths) More...
 
std::shared_ptr< face_sdk::license > FACE_SDK_EXPORT face_sdk::load_licence_from_file (const std::string &license_file)
 Load license from specified file. More...
 
std::shared_ptr< face_sdk::license > FACE_SDK_EXPORT face_sdk::load_licence_from_data (const std::vector< uint8_t > &data)
 Load license from memory. More...
 
std::vector< uint8_t > FACE_SDK_EXPORT face_sdk::generate_license_request (const std::vector< uint32_t > gpu_ids=std::vector< uint32_t >())
 Api function to generate license request. Usually you can use face_sdk_utils for this purpose. More...
 
std::shared_ptr< face_sdk::serializer > FACE_SDK_EXPORT face_sdk::make_serializer ()
 Makes the face_sdk::serializer object.
 
std::shared_ptr< version_info > FACE_SDK_EXPORT face_sdk::make_version_info ()
 Makes a instaince of face_sdk::version_info.
 
std::shared_ptr< video_frame > FACE_SDK_EXPORT face_sdk::make_video_frame (uint64_t frame_id, std::chrono::milliseconds timestamp, const std::shared_ptr< face_sdk::image > &image)
 Makes a video frame with specified frame_id, timestamp and image. More...
 

Variables

const float face_sdk::UNKNOWN_CONFIDENCE = .0f
 
const uint32_t face_sdk::UNKNOWN_VERSION = 0
 

Detailed Description

Function Documentation

◆ generate_license_request()

std::vector<uint8_t> FACE_SDK_EXPORT face_sdk::generate_license_request ( const std::vector< uint32_t >  gpu_ids = std::vector< uint32_t >())

Api function to generate license request. Usually you can use face_sdk_utils for this purpose.

Parameters
[in]gpu_idsValue of this parameter should be the number of GPU-device, where the algorithms are to be executed.
Exceptions
face_sdk::invalid_parameter_exceptionIf there is no gpu device with such id.
Examples
license.cpp.

◆ load_image_from_data()

std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT face_sdk::load_image_from_data ( const std::uint8_t *  data,
int32_t  data_size 
)

Load encoded image from memory.

Parameters
[in]datapointer to memory with encoded image
[in]data_sizesize of data
Exceptions
face_sdk::exception

◆ load_image_from_file()

std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT face_sdk::load_image_from_file ( const std::string &  file_name)

Load encoded image from file. Image must be in RBG or BRG channels order. Grayscale or images with alfa-channel not allowed.

Exceptions
face_sdk::exception
Examples
complex.cpp, serialize.cpp, and tracker.cpp.

◆ load_licence_from_data()

std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT face_sdk::load_licence_from_data ( const std::vector< uint8_t > &  data)

Load license from memory.

Parameters
[in]datadata with licene
Exceptions
face_sdk::exception

◆ load_licence_from_file() [1/2]

std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT face_sdk::load_licence_from_file ( )

Load license from file in known paths. (see Known paths)

Exceptions
face_sdk::exception

◆ load_licence_from_file() [2/2]

std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT face_sdk::load_licence_from_file ( const std::string &  license_file)

Load license from specified file.

Parameters
[in]license_filefile with license
Exceptions
face_sdk::file_exceptionif can't read file
face_sdk::exception

◆ make_face() [1/4]

std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT face_sdk::make_face ( const std::shared_ptr< image > &  img)

Make the face object and its bounding box size equal to the original image size.

Exceptions
face_sdk::exception
Examples
serialize.cpp.

◆ make_face() [2/4]

std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT face_sdk::make_face ( const std::shared_ptr< image > &  img,
int32_t  x,
int32_t  y,
int32_t  width,
int32_t  height,
float  confidence 
)

Make the face object with specified size and coordinates of bounding box.

Parameters
[in]imgimage with face
[in]xx coordinate of face bounding box in pixels
[in]yy coordinate of face bounding box in pixels
[in]widthwidth of face bounding box in pixels
[in]heightheight of face bounding box in pixels
[in]confidencealways set to 1.0f
Exceptions
face_sdk::exceptionSee Exceptions handling

◆ make_face() [3/4]

std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT face_sdk::make_face ( const std::shared_ptr< image > &  img,
int32_t  x,
int32_t  y,
int32_t  width,
int32_t  height,
float  confidence,
const std::vector< std::tuple< int32_t, int32_t > > &  landmarks 
)

Make the face object with specified size and coordinates of bounding box and specified landmarks.

Parameters
[in]imgimage with face
[in]xx coordinate of face bounding box in pixels
[in]yy coordinate of face bounding box in pixels
[in]widthwidth of face bounding box in pixels
[in]heightheight of face bounding box in pixels
[in]confidencealways set to 1.0f
Exceptions
face_sdk::exceptionSee Exceptions handling

◆ make_face() [4/4]

std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT face_sdk::make_face ( const std::shared_ptr< image > &  img,
int32_t  x,
int32_t  y,
int32_t  width,
int32_t  height,
float  confidence,
const std::vector< std::tuple< int32_t, int32_t > > &  landmarks,
const std::shared_ptr< image > &  cropped_image 
)

Make the face object with specified size and coordinates of bounding box and specified landmarks.

Parameters
[in]imgimage with face
[in]xx coordinate of face bounding box in pixels
[in]yy coordinate of face bounding box in pixels
[in]widthwidth of face bounding box in pixels
[in]heightheight of face bounding box in pixels
[in]confidencealways set to 1.0f
[in]cropped_imagecropped face
Exceptions
face_sdk::exceptionSee Exceptions handling

◆ make_image_from_data() [1/2]

std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT face_sdk::make_image_from_data ( const std::uint8_t *  data,
std::uint32_t  width,
std::uint32_t  height 
)

Makes image object from bitmap. Bitmap must 24bpp RGB format.

Parameters
[in]datapointer to memory with bitmap
[in]widthbitmap width in pixels
[in]heightbitmap height in pixels

◆ make_image_from_data() [2/2]

std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT face_sdk::make_image_from_data ( const std::uint8_t *  data,
std::uint32_t  width,
std::uint32_t  height,
std::uint32_t  stride 
)

Makes image object from bitmap. Bitmap must 24bpp RGB format.

Parameters
[in]datapointer to memory with bitmap
[in]widthbitmap width in pixels
[in]heightbitmap height in pixels
[in]stridebitmap row size in bytes

◆ make_video_frame()

std::shared_ptr<video_frame> FACE_SDK_EXPORT face_sdk::make_video_frame ( uint64_t  frame_id,
std::chrono::milliseconds  timestamp,
const std::shared_ptr< face_sdk::image > &  image 
)

Makes a video frame with specified frame_id, timestamp and image.

Examples
tracker.cpp.