1 #ifndef __RK_AIQ_ORB_ALGO_H__ 2 #define __RK_AIQ_ORB_ALGO_H__ 3 4 #define MAX_POINTS 10000 5 #define DESCRIPTOR_SIZE 15 6 #define ORB_FEATURE_DESCRIPTOR_BITS 120 7 #define ORB_FEATURE_DUMMY_NUM 13 8 9 #include "rk_aiq_comm.h" 10 11 RKAIQ_BEGIN_DECLARE 12 13 typedef struct { 14 unsigned char brief[DESCRIPTOR_SIZE]; 15 unsigned int x : 13; 16 unsigned int y : 13; 17 unsigned int dmy1 : 6; 18 unsigned char dmy2[ORB_FEATURE_DUMMY_NUM]; 19 } rk_aiq_orb_featue_point; 20 21 typedef struct { 22 unsigned int num_points; 23 rk_aiq_orb_featue_point points[MAX_POINTS]; 24 uint32_t frame_id; 25 int img_buf_index; 26 unsigned int img_size; 27 int buf_fd[16]; 28 int buf_idx[16]; 29 int buf_num; 30 void *buf_map; 31 } rk_aiq_orb_algo_stat_t; 32 33 typedef struct { 34 unsigned char update; 35 unsigned char orb_en; 36 unsigned char limit_value; 37 unsigned short max_feature; 38 } rk_aiq_orb_algo_meas_t; 39 40 typedef struct { 41 unsigned short row; 42 unsigned short col; 43 unsigned char descriptor[DESCRIPTOR_SIZE]; 44 } orb_point_t; 45 46 typedef struct { 47 unsigned int row1; 48 unsigned int col1; 49 unsigned int row2; 50 unsigned int col2; 51 unsigned int score; 52 } orb_matched_point_t; 53 54 typedef struct { 55 unsigned int left; 56 unsigned int top; 57 unsigned int right; 58 unsigned int bottom; 59 unsigned int width; 60 unsigned int height; 61 } orb_rect_t; 62 63 typedef struct { 64 unsigned char valid; 65 orb_rect_t tracking_roi_rect; 66 unsigned int matched_keypoints_num; 67 orb_matched_point_t matched_keypoints[MAX_POINTS]; 68 } orb_preprocess_result_t; 69 70 RKAIQ_END_DECLARE 71 72 #endif 73