KanduAI SDK API
KanduAI SDK API

Face Age and Gender

Face Age and Gender description

Functions

void *rf_face_agegender_init(const char *agegender_path, rf_error_type *error)

Initializes “age and gender” detector.

Return

”age and gender” detector handle

Parameters
  • agegender_path: path to the “age and gender” model

  • error: output parameter to return an error details

void rf_face_agegender_close(void *face_agegender_handle, rf_error_type *error)

Deletes “age and gender” detector.

Parameters
  • face_agegender_handle: “age and gender” detector handle

  • error: output parameter to return an error details

void rf_face_agegender_get(void *face_agegender_handle, void *face_landmarks_handle, void *image_handle, int ymin, int xmin, int ymax, int xmax, int *out_age, int *out_gender, rf_error_type *error)

Detects “age and gender” of a given person that appears in the image

Parameters
  • face_agegender_handle: “age and gender” detector handle

  • face_landmarks_handle: “face landmarks” detector handle

  • image_handle: image handle (use image API to create)

  • ymin: the top y position of the bounding box where the face is located

  • xmin: the left x position of the bounding box where the face is located

  • ymax: the bottom y position of the bounding box where the face is located

  • xmax: the right x position of the bounding box where the face is located

  • out_age: output parameter that returns age

  • out_gender: output parameter that returns gender 0 - female, 1 - male

  • error: output parameter to return an error details

void rf_face_agegedner_get_from_aligned_face(void *face_agegender_handle, void *aligned_face_handle, int *out_age, int *out_gender, rf_error_type *error)

Detects “age and gender” of a given person that appears in the image

Parameters
  • face_agegender_handle: “age and gender” detector handle

  • aligned_face_handle: aligned image handle (use rf_face_landmarks_align_face to create)

  • out_age: output parameter that returns age

  • out_gender: output parameter that returns gender 0 - female, 1 - male

  • error: output parameter to return an error details