Structure and Interface Configuration Parameter Macro Definition
General type interface description
Windows/Linux/Arm_Linux interface is described here, for Android interface please refer to Android interface description.
Structure and macro definition description
st_handle_t
Function: Handle for saving functions and data, need to call its corresponding destruct function to release and recycle memory
Declaration:
typedefvoid*st_handle_t;
st_result_t
Function: Indicate returned error code.
Declaration:
typedefintst_result_t;
struct stid_detection_result
Function: Face frame information.
Declaration:
typedefstructstid_detection_result {cv_rect32i_t rect; ///< Result rectfloat score; ///< Result scoreint label; ///< result labelint orientation; ///< result orientationunsignedint reserved1;unsignedint reserved2;} stid_detection_result_t;
struct stid_landmarks
Function: Face key points information
Declaration:
typedefstructstid_landmarks { cv_point3D32f *points_array; ///< Key points arrayunsignedchar*points_available; ///< Identify whether key points are available, contain points_count elements, corresponding to points_array, a value of 1 indicates available, and 0 indicates unavailableint points_count; ///< Number of key pointsint label; ///< Obtain by trackingfloat alignment_score; ///< Key point alignment scorefloat label_score;void* extra_info; ///< Key point intermediate informationfloat* points_score;unsignedint reserved1;unsignedint reserved2;} stid_landmarks_t;
struct stid_target
Function: Tracking result
Declaration:
typedefstructstid_target {stid_detection_result_t detect_result; ///< Framestid_landmarks_t landmarks; ///< Key pointsint id; ///< Face id, during face tracking, when the currently tracked face changes, increase the value by 1 (it only indicates change, does not identify whether it is the same person).} stid_target_t;
stid_pose
Function: Posture angle information
Declaration:
typedefstructstid_pose{float yaw; ///< Rotating angle around the Y axisfloat pitch; ///< Rotating angle around the X axisfloat roll; ///< Rotating angle around the Z axis} stid_pose_t;
stid_face_quality
Function: Face quality information
Declaration:
typedefstructstid_face_quality {float distance2center; ///< [0,1]. max(1-distance from the features center to image center/image short edge length, 0)float size; ///< [0,1]. area of the facial features in the image/image areafloat occlusion; ///< [0,1]. uncovered facial features area/area of the facial featuresfloat brightness; ///< [-1,1]. higher scores indicate higher brightnessfloat sharpness; ///< [0,1]. higher scores indicate higher sharpnessfloat mouth_open; ///< [0,1]. calculate the degree of mouth opening, higher scores indicate lower degrees of mouth openingfloat missing; ///< [0,1]. area of the facial features in the image/area of the facial features} stid_face_quality_t;
config (detect)
Function: Face detection mode
Declaration:
#defineSTID_FACEPRO_DETECTOR_CONFIG_LARGE_FACE0x00000000 //Large face#defineSTID_FACEPRO_DETECTOR_CONFIG_SMALL_FACE0x00000200 //Small face#defineSTID_FACEPRO_DETECTOR_CONFIG_ANY_FACE0x00000400 //Large and small face combinations, slower
config (track)
Function: Use asynchronous tracking, recommend to use only when the detection model is slower and requires real-time preview
#defineSTID_FACEPRO_TRACKING_CONFIG_LARGE_FACE0x00000000 //Large face#defineSTID_FACEPRO_TRACKING_CONFIG_SMALL_FACE0x00000200 //Small face
config (track)
Function: Set the maximum number of targets to track as N. The valid range is [1, 32] with a default value of 1. Continue to track the detected N targets until the number of targets is less than N, before continuing to detect again. Set as 1 for single-face tracking