RockX  1.0.0
face.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * Copyright (c) 2017 - 2019 by Rockchip Corp. All rights reserved.
4 *
5 * The material in this file is confidential and contains trade secrets
6 * of Rockchip Corporation. This is proprietary information owned by
7 * Rockchip Corporation. No part of this work may be disclosed,
8 * reproduced, copied, transmitted, or used in any way for any purpose,
9 * without the express written permission of Rockchip Corporation.
10 *
11 *****************************************************************************/
12 
13 #ifndef _ROCKX_FACE_H
14 #define _ROCKX_FACE_H
15 
16 #include <stddef.h>
17 #include "rockx_type.h"
18 #include "object_detection.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
27 typedef struct rockx_face_landmark_t {
33  float score;
35 
39 typedef struct rockx_face_angle_t {
40  float pitch;
41  float yaw;
42  float roll;
44 
48 typedef struct rockx_face_feature_t {
49  int version;
50  int len;
51  float feature[512];
53 
57 typedef struct rockx_face_attribute_t {
58  int gender;
59  int age;
61 
65 typedef struct rockx_face_antispoof_t {
66  float fake_score;
67  float real_score;
69 
79  rockx_async_callback callback);
80 
94  rockx_face_landmark_t *out_landmark);
95 
103 
114  rockx_face_landmark_t *in_landmark, rockx_image_t *out_img);
115 
124 
132 rockx_ret_t rockx_face_feature_similarity(rockx_face_feature_t *in_feature1, rockx_face_feature_t *in_feature2, float *out_similarity);
133 
142 
152 //rockx_ret_t rockx_face_3d_antispoof(rockx_handle_t handle, rockx_image_t *in_ir_img, rockx_image_t* in_depth_img,
153 // rockx_face_landmark_t *in_ir_face_landmark, rockx_face_antispoof_t *out_result);
154 
155 #ifdef __cplusplus
156 } //extern "C"
157 #endif
158 
159 #endif // _ROCKX_FACE_H
rockx_type.h
rockx_face_landmark_t
Face Landmark Result (get from rockx_face_landmark)
Definition: face.h:27
rockx_face_feature_t::len
int len
Feature length.
Definition: face.h:50
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)
rockx_face_antispoof_t::real_score
float real_score
score of real
Definition: face.h:67
rockx_face_attribute_t
struct rockx_face_attribute_t rockx_face_attribute_t
Face Attritute Result (get from rockx_face_attribute)
rockx_face_angle_t
Face Angle Result (get from rockx_face_pose)
Definition: face.h:39
rockx_face_antispoof_t
struct rockx_face_antispoof_t rockx_face_antispoof_t
Face Antispoof Result.
rockx_face_pose
rockx_ret_t rockx_face_pose(rockx_face_landmark_t *in_landmark, rockx_face_angle_t *out_angle)
rockx_face_attribute_t::age
int age
Age.
Definition: face.h:59
rockx_face_landmark_t::face_box
rockx_rect_t face_box
Face region.
Definition: face.h:30
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)
rockx_face_landmark_t::image_height
int image_height
Input image height.
Definition: face.h:29
rockx_face_attribute_t::gender
int gender
Gender.
Definition: face.h:58
rockx_face_feature_t
Face Feature Result (get from rockx_face_recognize)
Definition: face.h:48
rockx_ret_t
rockx_ret_t
Return Value of RockX functions.
Definition: rockx_type.h:36
rockx_face_landmark_t::image_width
int image_width
Input image width.
Definition: face.h:28
rockx_object_array_t
Object Array Result.
Definition: object_detection.h:49
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)
rockx_face_attribute_t
Face Attritute Result (get from rockx_face_attribute)
Definition: face.h:57
rockx_face_landmark_t::score
float score
Score (Only 5 points has score)
Definition: face.h:33
rockx_rect_t
Rectangle of Object Region.
Definition: rockx_type.h:102
rockx_face_angle_t::yaw
float yaw
Yaw angle ( < 0: Left, > 0: Right )
Definition: face.h:41
rockx_face_antispoof_t::fake_score
float fake_score
score of fake
Definition: face.h:66
object_detection.h
rockx_async_callback
void(* rockx_async_callback)(void *result, size_t result_size)
Pointer of Async Callback Function.
Definition: rockx_type.h:31
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)
rockx_face_antispoof_t
Face Antispoof Result.
Definition: face.h:65
rockx_face_attribute
rockx_ret_t rockx_face_attribute(rockx_handle_t handle, rockx_image_t *in_img, rockx_face_attribute_t *attr)
rockx_face_landmark_t::landmarks_count
int landmarks_count
Landmark points count.
Definition: face.h:31
rockx_face_angle_t
struct rockx_face_angle_t rockx_face_angle_t
Face Angle Result (get from rockx_face_pose)
rockx_handle_t
void * rockx_handle_t
Handle of a created RockX module.
Definition: rockx_type.h:26
rockx_point_t
Point.
Definition: rockx_type.h:86
rockx_face_landmark_t
struct rockx_face_landmark_t rockx_face_landmark_t
Face Landmark Result (get from rockx_face_landmark)
rockx_image_t
Image.
Definition: rockx_type.h:122
rockx_face_recognize
rockx_ret_t rockx_face_recognize(rockx_handle_t handle, rockx_image_t *in_img, rockx_face_feature_t *out_feature)
rockx_face_feature_t::feature
float feature[512]
Feature data.
Definition: face.h:51
rockx_face_angle_t::pitch
float pitch
Pitch angle ( < 0: Up, > 0: Down )
Definition: face.h:40
rockx_face_feature_t
struct rockx_face_feature_t rockx_face_feature_t
Face Feature Result (get from rockx_face_recognize)
rockx_face_landmark_t::landmarks
rockx_point_t landmarks[128]
Landmark points.
Definition: face.h:32
rockx_face_feature_t::version
int version
Face recognition algorithm version.
Definition: face.h:49
rockx_face_angle_t::roll
float roll
Roll angle ( < 0: Right, > 0: Left )
Definition: face.h:42