RockX  1.0.0
Data Structures | Typedefs | Functions
face.h File Reference
#include <stddef.h>
#include "rockx_type.h"
#include "object_detection.h"

Go to the source code of this file.

Data Structures

struct  rockx_face_landmark_t
 Face Landmark Result (get from rockx_face_landmark) More...
 
struct  rockx_face_angle_t
 Face Angle Result (get from rockx_face_pose) More...
 
struct  rockx_face_feature_t
 Face Feature Result (get from rockx_face_recognize) More...
 
struct  rockx_face_attribute_t
 Face Attritute Result (get from rockx_face_attribute) More...
 
struct  rockx_face_antispoof_t
 Face Antispoof Result. More...
 

Typedefs

typedef struct rockx_face_landmark_t rockx_face_landmark_t
 Face Landmark Result (get from rockx_face_landmark) More...
 
typedef struct rockx_face_angle_t rockx_face_angle_t
 Face Angle Result (get from rockx_face_pose) More...
 
typedef struct rockx_face_feature_t rockx_face_feature_t
 Face Feature Result (get from rockx_face_recognize) More...
 
typedef struct rockx_face_attribute_t rockx_face_attribute_t
 Face Attritute Result (get from rockx_face_attribute) More...
 
typedef struct rockx_face_antispoof_t rockx_face_antispoof_t
 Face Antispoof Result. More...
 

Functions

rockx_ret_t rockx_face_detect (rockx_handle_t handle, rockx_image_t *in_img, rockx_object_array_t *face_array, rockx_async_callback callback)
 
rockx_ret_t rockx_face_landmark (rockx_handle_t handle, rockx_image_t *in_img, rockx_rect_t *in_box, rockx_face_landmark_t *out_landmark)
 
rockx_ret_t rockx_face_pose (rockx_face_landmark_t *in_landmark, rockx_face_angle_t *out_angle)
 
rockx_ret_t rockx_face_align (rockx_handle_t handle, rockx_image_t *in_img, rockx_rect_t *in_box, rockx_face_landmark_t *in_landmark, rockx_image_t *out_img)
 
rockx_ret_t rockx_face_recognize (rockx_handle_t handle, rockx_image_t *in_img, rockx_face_feature_t *out_feature)
 
rockx_ret_t rockx_face_feature_similarity (rockx_face_feature_t *in_feature1, rockx_face_feature_t *in_feature2, float *out_similarity)
 
rockx_ret_t rockx_face_attribute (rockx_handle_t handle, rockx_image_t *in_img, rockx_face_attribute_t *attr)
 

Typedef Documentation

◆ rockx_face_angle_t

Face Angle Result (get from rockx_face_pose)

◆ rockx_face_antispoof_t

Face Antispoof Result.

◆ rockx_face_attribute_t

Face Attritute Result (get from rockx_face_attribute)

◆ rockx_face_feature_t

Face Feature Result (get from rockx_face_recognize)

◆ rockx_face_landmark_t

Face Landmark Result (get from rockx_face_landmark)

Function Documentation

◆ rockx_face_align()

rockx_ret_t rockx_face_align ( rockx_handle_t  handle,
rockx_image_t in_img,
rockx_rect_t in_box,
rockx_face_landmark_t in_landmark,
rockx_image_t out_img 
)

Face Correction Alignment

Parameters
handle[in] Handle of a created ROCKX_MODULE_FACE_LANDMARK_5 module(created by rockx_create)
in_img[in] Input image
in_box[in] Detection Result
in_landmark[in] Face landmark result (if set NULL will call rockx_face_landmark to get a landmark result)
out_img[out] Aligned face image
Returns
rockx_ret_t

◆ rockx_face_attribute()

rockx_ret_t rockx_face_attribute ( rockx_handle_t  handle,
rockx_image_t in_img,
rockx_face_attribute_t attr 
)

Face Attribute (Gender and Age)

Parameters
handle[in] Handle of a created ROCKX_MODULE_FACE_ANALYZE module(created by rockx_create)
in_img[in] Input Image
attr[out] Face attribute
Returns
rockx_ret_t

◆ rockx_face_detect()

rockx_ret_t rockx_face_detect ( rockx_handle_t  handle,
rockx_image_t in_img,
rockx_object_array_t face_array,
rockx_async_callback  callback 
)

Face Detection

Parameters
handle[in] Handle of a created ROCKX_MODULE_FACE_DETECTION module(created by rockx_create)
in_img[in] Input image
face_array[out] Face detection result array
callback[in] Async callback function pointer
Returns
rockx_ret_t

◆ rockx_face_feature_similarity()

rockx_ret_t rockx_face_feature_similarity ( rockx_face_feature_t in_feature1,
rockx_face_feature_t in_feature2,
float *  out_similarity 
)

Compare Two Face Feature Similarity

Parameters
in_feature1[in] Face 1 Feature
in_feature2[in] Face 2 Feature
out_similarity[out] Similarity (more smaller more similar)
Returns
rockx_ret_t

◆ rockx_face_landmark()

rockx_ret_t rockx_face_landmark ( rockx_handle_t  handle,
rockx_image_t in_img,
rockx_rect_t in_box,
rockx_face_landmark_t out_landmark 
)

Face Landmark KeyPoint (Current can get 68 or 5 key points)

Face Landmark 68 KeyPoint As Show In Figure 1.

Figure 1 Face Landmark 68 KeyPoint
Parameters
handle[in] Handle of a created ROCKX_MODULE_FACE_LANDMARK_68 or ROCKX_MODULE_FACE_LANDMARK_5 module(created by rockx_create)
in_img[in] Input image
in_box[in] Face region(get from rockx_face_detect)
out_landmark[out] Face landmark
Returns
rockx_ret_t

◆ rockx_face_pose()

rockx_ret_t rockx_face_pose ( rockx_face_landmark_t in_landmark,
rockx_face_angle_t out_angle 
)

Face Pose

Parameters
in_landmark[in] Face landmark result (get from rockx_face_landmark)
out_angle[out] Angle of Face
Returns
rockx_ret_t

◆ rockx_face_recognize()

rockx_ret_t rockx_face_recognize ( rockx_handle_t  handle,
rockx_image_t in_img,
rockx_face_feature_t out_feature 
)

Get Face Feature

Parameters
handle[in] Handle of a created ROCKX_MODULE_FACE_RECOGNIZE module(created by rockx_create)
in_img[in] Input image
out_feature[out] Face Feature
Returns
rockx_ret_t