1 #ifndef _OCCLUSION_DETECTION_H 2 #define _OCCLUSION_DETECTION_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 typedef struct { 9 unsigned short flag; // 1 有效, 0无效 10 unsigned short up_left[2]; // 下采样前左上角坐标,0是y坐标,1是x坐标 11 unsigned short down_right[2]; // 下采样前右下角坐标,0是y坐标,1是x坐标 12 unsigned short occlusion; // 1 遮挡, 0没遮挡 13 } OD_ROI_INFO; 14 15 typedef void* od_ctx; 16 17 od_ctx occlusion_detection_init(int width, int height); 18 int occlusion_detection_deinit(od_ctx ctx); 19 int occlusion_detection(od_ctx ctx, void *downscale_frame_y, OD_ROI_INFO *p_roi_in, int roi_cnt); 20 int occlusion_refresh_bg(od_ctx ctx); 21 int occlusion_set_sensitivity(od_ctx ctx, int value); 22 int occlusion_detection_enable_switch(od_ctx ctx, int enable, int value); 23 24 #ifdef __cplusplus 25 } //extern "C" 26 #endif 27 28 #endif // _OCCLUSION_DETECTION_H 29