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

Go to the source code of this file.

Functions

void * rf_face_landmarks_init (const char *landmarks_path, rf_error_type *error)
 
void rf_face_landmarks_close (void *face_landmarks_handle, rf_error_type *error)
 
void rf_face_landmarks_get (void *face_landmarks_handle, void *image_handle, int ymin, int xmin, int ymax, int xmax, rf_int_vector_type *out_landmarks, rf_error_type *error)
 
void rf_face_landmarks_align_face (rf_int_vector_type landmarks, void *image_handle, int ymin, int xmin, int ymax, int xmax, void **out_align_face, rf_error_type *error)
 

Function Documentation

◆ rf_face_landmarks_align_face()

void rf_face_landmarks_align_face ( rf_int_vector_type  landmarks,
void *  image_handle,
int  ymin,
int  xmin,
int  ymax,
int  xmax,
void **  out_align_face,
rf_error_type error 
)

Alignes face based on supplied landmarks.

Parameters
landmarksflattened array of 68 face landmarks (use rf_face_landmarks_get)
image_handleimage 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_align_faceoutput parameter returns a handle of the aligned face
erroroutput parameter to return an error details

◆ rf_face_landmarks_close()

void rf_face_landmarks_close ( void *  face_landmarks_handle,
rf_error_type error 
)

Deletes face landmarks detector.

Parameters
face_landmarks_handleface landmarks handle
erroroutput parameter to return an error details

◆ rf_face_landmarks_get()

void rf_face_landmarks_get ( void *  face_landmarks_handle,
void *  image_handle,
int  ymin,
int  xmin,
int  ymax,
int  xmax,
rf_int_vector_type out_landmarks,
rf_error_type error 
)

Detects face landmarks for a face within bounding box.

Parameters
face_landmarks_handleface landmarks 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_landmarksreturns flattened array of 68 face landmarks points which are represented as 136 coordinates (y1, x1, y2, x2, ...)
erroroutput parameter to return an error details

◆ rf_face_landmarks_init()

void* rf_face_landmarks_init ( const char *  landmarks_path,
rf_error_type error 
)

Initializes face landmarks detector.

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