KanduAI SDK  1.1
Functions
face_recognition_c_api.h File Reference
#include "api_types.h"

Go to the source code of this file.

Functions

void * rf_face_recognition_init (const char *landmarks_path, const char *recognition_path, rf_error_type *error)
 
void rf_face_recognition_close (void *face_recognition_handle, rf_error_type *error)
 
void rf_face_recognition_get_embedding (void *face_recognition_handle, void *image_handle, int ymin, int xmin, int ymax, int xmax, rf_float_vector_type *out_embedding, rf_error_type *error)
 
void rf_face_recognition_get_embedding_from_aligned_face (void *face_recognition_handle, void *aligned_face_handle, rf_float_vector_type *out_embedding, rf_error_type *error)
 

Function Documentation

◆ rf_face_recognition_close()

void rf_face_recognition_close ( void *  face_recognition_handle,
rf_error_type error 
)

Deletes face recognition.

Parameters
face_recognition_handleface recognition handle
erroroutput parameter to return an error details

◆ rf_face_recognition_get_embedding()

void rf_face_recognition_get_embedding ( void *  face_recognition_handle,
void *  image_handle,
int  ymin,
int  xmin,
int  ymax,
int  xmax,
rf_float_vector_type out_embedding,
rf_error_type error 
)

Extracts face embedding vector from cropped face.

Parameters
face_recognition_handleface recognition handle
image_handlefull image handle (use image API to create)
yminthe top y position of the bounding box where the face is located
xminthe left x position of the bounding box where the face is located
ymaxthe bottom y position of the bounding box where the face is located
xmaxthe right x position of the bounding box where the face is located
out_embeddingoutput parameter to return a 128-dimension embedding vector
erroroutput parameter to return an error details

◆ rf_face_recognition_get_embedding_from_aligned_face()

void rf_face_recognition_get_embedding_from_aligned_face ( void *  face_recognition_handle,
void *  aligned_face_handle,
rf_float_vector_type out_embedding,
rf_error_type error 
)

Extracts face embedding vector from cropped face.

Parameters
face_recognition_handleface recognition handle
aligned_face_handlealigned image handle (use rf_face_landmarks_align_face to create)
out_embeddingoutput parameter to return a 128-dimension embedding vector
erroroutput parameter to return an error details

◆ rf_face_recognition_init()

void* rf_face_recognition_init ( const char *  landmarks_path,
const char *  recognition_path,
rf_error_type error 
)

Initializes face recognition.

Parameters
landmarks_pathpath to the landmarks model
recognition_pathpath to the recognition model
erroroutput parameter to return an error details
Returns
face recognition handle