|
|
#pragma once |
|
|
#ifndef TEST_NNCTRL_LIVE_H |
|
|
#define TEST_NNCTRL_LIVE_H |
|
|
|
|
|
#include "define_inc.h" |
|
|
#include "network.h" |
|
|
#include "cryptionPlus.h" |
|
|
#include "nweb.h" |
|
|
#include "lib_data_process.h" |
|
|
#include <stdio.h> |
|
|
#include <stdlib.h> |
|
|
#include <string.h> |
|
|
#include <ctype.h> |
|
|
#include <errno.h> |
|
|
#include <getopt.h> |
|
|
#include <sched.h> |
|
|
#include <unistd.h> |
|
|
#include <fcntl.h> |
|
|
#include <sys/stat.h> |
|
|
#include <sys/ioctl.h> |
|
|
#include <sys/mman.h> |
|
|
#include <sys/time.h> |
|
|
#include <sys/wait.h> |
|
|
#include <sys/socket.h> |
|
|
#include <sys/types.h> |
|
|
#include <sys/prctl.h> |
|
|
#include <time.h> |
|
|
#include <arpa/inet.h> |
|
|
#include <assert.h> |
|
|
#include <netdb.h> |
|
|
#include <netinet/in.h> |
|
|
#include <signal.h> |
|
|
#include <stdint.h> |
|
|
#include <math.h> |
|
|
|
|
|
#include <dirent.h> |
|
|
|
|
|
#include <stdio.h> |
|
|
#include <stdlib.h> |
|
|
#include <string.h> |
|
|
|
|
|
#ifdef GY_OS_AMBA |
|
|
#include "iav_ioctl.h" |
|
|
#include "cavalry_gen.h" |
|
|
#include "cavalry_ioctl.h" |
|
|
#include "cavalry_mem.h" |
|
|
#endif |
|
|
#include "nnctrl.h" |
|
|
#ifdef GY_OS_AMBA |
|
|
#include "vproc.h" |
|
|
#endif |
|
|
#include "nnctrl_live_utils.h" |
|
|
|
|
|
//#include "lib_smartfb.h" |
|
|
#include "utility.h" |
|
|
#include "cJSON.h" |
|
|
#include "ColorDetectorC.h" |
|
|
|
|
|
#include "darknet.h" |
|
|
|
|
|
#if defined GY_OS_AMBA || defined GY_OS_NOVA |
|
|
#include "fflpr_plate_db.h" |
|
|
#endif |
|
|
#ifdef GY_OS_AMBA |
|
|
//#include "face_parser.h" |
|
|
//#include "face_db.h" |
|
|
|
|
|
#include "ptz.h" |
|
|
#endif |
|
|
#include "cold_zone.h" |
|
|
#include "pns.h" |
|
|
|
|
|
#include <linux/fb.h> |
|
|
|
|
|
#include "opencv2/core/core_c.h" |
|
|
#include "fork_pipe_lib.h" |
|
|
#include "ivsC.h" |
|
|
|
|
|
#include "cv_point_transform.hpp" |
|
|
#ifdef GY_OS_AMBA |
|
|
#include "send_osd_data.h" |
|
|
#endif |
|
|
#include "levenshtein.h" |
|
|
#ifdef GY_OS_AMBA |
|
|
//#include "tof.h" |
|
|
#endif |
|
|
#include "onvif_data.h" |
|
|
#ifdef GY_OS_NOVA |
|
|
#include "bbox_receive.h" |
|
|
#endif |
|
|
#define MAX_NET_NUM (4) //16 |
|
|
#define MAX_PLATE_BUF_NUM (15) //MAX_PLATE_BUF_NUM |
|
|
|
|
|
#ifdef GY_OS_AMBA |
|
|
#define MAX_OBJECT_NUM (36) //MAX_OBJECT_NUM |
|
|
#define MAX_FACE_NUM (20) //MAX_FACE_NUM // max face num need to be confirmed - leo |
|
|
#else |
|
|
#define MAX_OBJECT_NUM (25) //MAX_OBJECT_NUM 36 |
|
|
#endif |
|
|
|
|
|
#define FILENAME_LENGTH (256) |
|
|
|
|
|
#ifndef ROUND_UP |
|
|
#define ROUND_UP(size, align) (((size) + ((align)-1)) & ~((align)-1)) |
|
|
#endif |
|
|
#define FIX8_MIN_ACCURACY 0.00390625f |
|
|
|
|
|
//#define LILIN_SHOW_FPS |
|
|
#define MAX_CLASS_NUM (1024) |
|
|
#define ROUND_UP_32(x) ((x)&0x1f ? (((x)&0xffffffe0) + 32) : (x)) |
|
|
|
|
|
#define CLASSNAME_LENGTH (256) |
|
|
#define PATH_COUNT_SLASH (7) |
|
|
#define MAX_FLOAT_VALUE_NUM (32) |
|
|
|
|
|
//#define ROUND_UP_32(x) ((x)&0x1f ? (((x)&0xffffffe0) + 32) : (x)) |
|
|
|
|
|
#define GET_AI_FPS_SEC (5) |
|
|
#define GET_AI_FRAME_COUNTER (21) |
|
|
#define GET_CPU_LOADING_SEC (10) |
|
|
#define WRITE_CONFIG_FILE (10) |
|
|
|
|
|
struct cv_mem { |
|
|
void *virt; |
|
|
unsigned long phys; |
|
|
unsigned long size; |
|
|
}; |
|
|
|
|
|
struct io_match { |
|
|
uint32_t load_input : 1; |
|
|
uint32_t store_output : 1; |
|
|
uint32_t no_mem : 1; |
|
|
uint32_t crc_inited : 1; |
|
|
uint32_t out_stored : 1; |
|
|
uint32_t rotate_flip_bitmap : 5; |
|
|
uint32_t reserved_0 : 29; |
|
|
|
|
|
uint32_t crc_result; |
|
|
|
|
|
uint8_t *virt_addr; |
|
|
uint32_t dram_addr; |
|
|
uint32_t dram_size; |
|
|
uint32_t data_size; |
|
|
|
|
|
struct io_dim dim; |
|
|
struct io_data_fmt data_fmt; |
|
|
|
|
|
char port_name[CAVALRY_IO_NAME_MAX]; |
|
|
char file_name[FILENAME_LENGTH]; |
|
|
}; |
|
|
|
|
|
struct net_match{ |
|
|
uint32_t verbose : 1; /* nerual network verbose */ |
|
|
uint32_t reuse_mem : 1; |
|
|
uint32_t query_dvi : 1; |
|
|
uint32_t dump_en : 1; |
|
|
uint32_t print_time : 1; |
|
|
uint32_t have_no_mem_io : 1; |
|
|
uint32_t reserved_0 : 29; |
|
|
|
|
|
uint32_t net_id; |
|
|
int iter_num; |
|
|
uint32_t query_dvi_id; |
|
|
char net_name[FILENAME_LENGTH]; |
|
|
char path_dump[FILENAME_LENGTH]; |
|
|
|
|
|
struct net_run_cfg net_rev; |
|
|
|
|
|
uint32_t net_bw_sz; /* Total size */ |
|
|
uint32_t net_bw_us; /* VP time, unit: us */ |
|
|
struct net_mem net_m; // uint8_t* virt_addr, uint32_t phy_addr, uint32_t mem_size |
|
|
|
|
|
uint32_t in_num; |
|
|
uint32_t out_num; |
|
|
struct io_match in_pair[MAX_IO_NUM]; |
|
|
struct io_match out_pair[MAX_IO_NUM]; |
|
|
|
|
|
struct net_cfg net_cf; |
|
|
struct net_input_cfg net_in; |
|
|
struct net_output_cfg net_out; |
|
|
struct net_result net_ret; |
|
|
|
|
|
|
|
|
///dproc |
|
|
dproc_run_yolov3_output_param_t *yolov3_param; |
|
|
dproc_run_param_t run_yolov3_param; |
|
|
uint32_t yolov3_result_num; |
|
|
uint32_t feature_map_size[AMBA_YOLOV3_FEATURE_NUM]; |
|
|
dproc_yolov3_output_result_t *amba_yolov3_result; |
|
|
dproc_bbox_param_t *objects; |
|
|
struct net_out_bin_desc out_bin; |
|
|
//float *f_socket_data; //<EFBFBD>w<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~<EFBFBD><EFBFBD> |
|
|
//char *parse_buffer; //<EFBFBD>w<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~<EFBFBD><EFBFBD> |
|
|
uint32_t objects_id[MAX_DETECT_OBJECTS]; |
|
|
uint32_t feature_map_offset; |
|
|
|
|
|
uint32_t valid_result_num; |
|
|
|
|
|
int total_cls; |
|
|
|
|
|
float anchors[YOLOV3_ANCHOR_NUM]; |
|
|
char classNames[MAX_CLASS_NUM][CLASSNAME_LENGTH]; |
|
|
|
|
|
int is_netoutbindesc_initial; //sophia add 20201021 |
|
|
int input_bin_num; //sophia add 20201127 each net has own input_bin_num, depends on weight is tiny or none tiny. |
|
|
}; |
|
|
|
|
|
struct nnctrl_param { |
|
|
int fd_cav; |
|
|
|
|
|
uint32_t verbose : 1; /* nnctrl library verbose */ |
|
|
uint32_t all_cache_en : 1; /* 0: nocached; 1: cached */ |
|
|
uint32_t all_check_md5 : 1; |
|
|
uint32_t all_print_time : 1; |
|
|
uint32_t all_early_quit : 1; |
|
|
uint32_t all_run_loop : 1; |
|
|
uint32_t all_single_run_dag : 1; |
|
|
uint32_t reserved_0 : 25; |
|
|
|
|
|
uint32_t show_version_flag : 1; |
|
|
uint32_t early_quit_flag : 1; |
|
|
uint32_t ck_bw_flag : 1; |
|
|
uint32_t reserved_1 : 29; |
|
|
|
|
|
uint32_t cache_en : 1; /* 0: nocached; 1: cached */ |
|
|
|
|
|
//enum run_mode mode; |
|
|
uint32_t all_inter_num; |
|
|
|
|
|
uint32_t net_num; |
|
|
struct net_match net_pair[MAX_NET_NUM]; |
|
|
struct net_mem ext_mem[MAX_NET_NUM]; |
|
|
uint32_t valid_net[MAX_NET_NUM]; //check if net name is null; |
|
|
|
|
|
}; |
|
|
|
|
|
enum numeric_short_options { |
|
|
INPUT, |
|
|
OUTPUT, |
|
|
}; |
|
|
|
|
|
typedef struct |
|
|
{ |
|
|
int left; |
|
|
int right; |
|
|
int low; |
|
|
int high; |
|
|
int id; |
|
|
float prob; |
|
|
} object_t; |
|
|
|
|
|
extern int unlockingKeyInnoFR_success; |
|
|
extern int unlockingKeyInnoFR; |
|
|
|
|
|
extern int g_framesize_width; |
|
|
extern int g_framesize_height; |
|
|
|
|
|
//extern struct amba_content stAMBAcontent; |
|
|
|
|
|
extern float confidence_limit; |
|
|
#ifdef GY_OS_NOVA |
|
|
extern pthread_mutex_t mutex_parse_bbox; |
|
|
#endif |
|
|
extern pthread_mutex_t mutex_getalarmmotion; |
|
|
extern pthread_mutex_t mutex_alm; |
|
|
//extern pthread_mutex_t mutex_alarm_queue; //getalarmmotion<EFBFBD>|<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>D |
|
|
extern pthread_mutex_t mutex_enable_lpr_db; |
|
|
extern pthread_mutex_t mutex_run_one_net; |
|
|
#ifdef GY_OS_NOVA |
|
|
//extern pthread_mutex_t mutex_run_parse_json; |
|
|
#endif |
|
|
//extern pthread_mutex_t mutex_cropped_roi; |
|
|
extern pthread_mutex_t mutex_if_enable_lpr_db_is_Yes; |
|
|
extern pthread_mutex_t mutex_get_network_input; |
|
|
extern pthread_mutex_t mutex_differ_image; |
|
|
extern pthread_mutex_t mutex_run_one_net_anpr; |
|
|
//extern pthread_mutex_t mutex_snap_hd_image; |
|
|
extern pthread_mutex_t mutex_get_image; |
|
|
#ifdef GY_OS_AMBA |
|
|
extern pthread_mutex_t mutex_get_image_HD; |
|
|
extern pthread_mutex_t mutex_enable_face_db; // face - leo |
|
|
|
|
|
extern pthread_mutex_t mutex_send_jpeg; |
|
|
//extern pthread_mutex_t mutex_get_canvas; |
|
|
#endif |
|
|
extern pthread_mutex_t mutex_heatmap_jpeg; |
|
|
#ifdef GY_OS_AMBA |
|
|
extern pthread_mutex_t mutex_run_osd; |
|
|
#endif |
|
|
|
|
|
extern pthread_mutex_t mutex_read_ipcam; |
|
|
extern pthread_mutex_t mutex_compute_median; |
|
|
|
|
|
extern int switch_g_image_buff_ori; |
|
|
extern char g_image_buff_ori[MAX_NUM_IMAGE_BUFF][MAX_IMG_SIZE]; |
|
|
extern int g_image_buff_size_ori[MAX_NUM_IMAGE_BUFF]; |
|
|
extern char g_image_state_response_ori[256]; |
|
|
extern long g_post_SysTimeStamp_ori[MAX_NUM_IMAGE_BUFF]; |
|
|
#ifdef GY_OS_AMBA |
|
|
extern char g_image_buff_HD[MAX_NUM_IMAGE_BUFF][MAX_IMG_SIZE_HD]; |
|
|
extern int g_image_buff_size_HD[MAX_NUM_IMAGE_BUFF]; |
|
|
extern char g_image_state_response[256]; |
|
|
#endif |
|
|
extern char g_current_snapshot_addr_base64[MAX_IMG_SIZE]; |
|
|
extern int g_current_snapshot_size_base64; |
|
|
|
|
|
extern long g_image_HD_pasue_time; |
|
|
extern int g_video_start_HD; |
|
|
|
|
|
extern int g_dual_sensor; |
|
|
|
|
|
extern SocketInfo socketRecords[MAX_CLIENT_SOCKET]; |
|
|
extern ChannelInfo viewChannelData[MAX_AI_ENGINE_VIEW]; |
|
|
extern DetectionZoneInfo viewDetectionZone[MAX_AI_ENGINE_VIEW][MAX_DETECTION_ZONE]; |
|
|
extern SystemSettingInfo SystemSetting; |
|
|
extern PostEventInfo postEventList[MAX_POST_EVENTS]; |
|
|
#ifdef GY_OS_V_SERIES |
|
|
#else |
|
|
extern EventCounterInfo eventCounterList[MAX_EVENT_COUNTERS]; |
|
|
extern ReportCounterInfo reportCounterList[MAX_REPORT_COUNTERS]; |
|
|
extern SNMPManagementInfo SNMPManagementList[MAX_SNMP_MANAGEMENT]; |
|
|
#endif |
|
|
extern AccountDataInfo accountData[MAX_ACCOUNT_DATA_NUM]; //20201027 sophia add |
|
|
extern IPCAMServiceInfo IPCAMService; |
|
|
#ifdef GY_OS_AMBA |
|
|
extern SnapHDInfo snapHDList[MAX_SNAP_HD_LIST]; |
|
|
extern WeightFileInfo weightfileList[MAX_WEIGHT_FILE_LIST]; |
|
|
#endif |
|
|
extern char WeightFileModeName[35]; |
|
|
//extern EmailInfo emailData; |
|
|
extern HeartbeatInfo heartbeatData; |
|
|
#ifdef GY_OS_AMBA |
|
|
extern TofInfo tofData; |
|
|
#endif |
|
|
|
|
|
#if defined GY_OS_AMBA || defined GY_OS_NOVA |
|
|
extern PlateRecoder g_PlateRecorderList[MAX_PLATE_RECORDER]; |
|
|
#endif |
|
|
extern ObjectRecoder g_ObjectRecorderList[MAX_OBJECT_RECORDER]; |
|
|
extern PostRecoder g_PostRecorderList[MAX_POST_RECODER_SIZE]; |
|
|
extern PostRecoder g_longterm_PostRecorderList[MAX_POST_RECODER_SIZE]; |
|
|
|
|
|
//extern MotionAreaInfo g_Motion_Area_Data[MAX_MOTION_AREA]; |
|
|
|
|
|
extern ImageDn imageDnData; |
|
|
|
|
|
extern int g_check_if_metadata_stop_happened[MAX_DETECTION_ZONE]; |
|
|
#ifdef GY_OS_NOVA |
|
|
extern RecvBbox g_current_bbox_list[MAX_TRACKING_NUM]; |
|
|
extern int g_res_height; |
|
|
extern int g_res_width; |
|
|
extern int g_count_bbox_list; |
|
|
#endif |
|
|
extern int g_bMacMatch; |
|
|
extern time_t g_start_time, g_end_time; |
|
|
extern char g_filename_TLT[1024]; |
|
|
extern int g_li, g_ad; |
|
|
|
|
|
void stop_test_nn_cavalry(char* note_stop); |
|
|
#ifdef GY_OS_NOVA |
|
|
void* nnctrl_main(void *ptr); |
|
|
#endif |
|
|
|
|
|
#ifdef GY_OS_NOVA |
|
|
extern int AI_fps2; |
|
|
#endif |
|
|
|
|
|
#ifdef GY_OS_AMBA |
|
|
extern int g_check_if_OK_to_start_osd_server; |
|
|
|
|
|
extern int g_current_max_num_image_buff; |
|
|
|
|
|
extern char g_debug_plate[BUFSIZE_V2]; |
|
|
extern char global_radar_response[BUFSIZE_V3]; |
|
|
|
|
|
// Ken 10-28 |
|
|
extern float g_radar_img_width; |
|
|
extern float g_radar_img_height; |
|
|
|
|
|
// Ken 11-01 |
|
|
extern pthread_mutex_t mutex_radar_render; |
|
|
|
|
|
extern char global_radar_response[BUFSIZE_V3]; |
|
|
// Ken 10-28 |
|
|
extern float g_radar_img_width; |
|
|
extern float g_radar_img_height; |
|
|
|
|
|
// Ken 11-01 |
|
|
extern pthread_mutex_t mutex_radar_render; |
|
|
extern int g_IsRadarFake; |
|
|
#endif |
|
|
|
|
|
//extern int g_check_if_set_no_preset_no_autopan; |
|
|
#ifdef GY_OS_AMBA |
|
|
void *get_loading(); |
|
|
|
|
|
void free_all_cv_mem(struct nnctrl_param *pctrl); |
|
|
|
|
|
void* test_nn_main(void *ptr); |
|
|
int init_anchor_file(char* anchor_file, float* anchor, uint32_t tiny_enable); |
|
|
int init_amba_yolov3(dproc_yolov3_output_result_t** amba_yolov3_result, uint32_t net_idx, uint32_t total_cls, float* panchors, int tiny_enable); |
|
|
#endif |
|
|
void assign_row_number(detection_pos* PosInfo, detection_pos* pNext1, detection_pos* pNext2, int total_element_size, int element_size2, int parent_idx, float* arc); |
|
|
void linear_regression(detection_pos** p, int pointCount, double* a, double* b); |
|
|
extern int SortObjects(detection_pos* PosInfo, int total_element_size); |
|
|
void SetCorrectClassID(detection_pos *PosInfo, int total_element_size, int element_size1); |
|
|
int IsMatchAUSPattern(char* PlatePattern, char* area); |
|
|
int IsMatchGBRPattern(char* PlatePattern, char* area); |
|
|
int IsMatchIDNPattern(char* PlatePattern, char* area); |
|
|
int PlatePatternParser(detection_pos* PosInfo, int total_element_size, size_t featureType/*, float arc*/); |
|
|
|
|
|
void set_enable_downsized_cropped_roi(int temp_enable_downsized_cropped_roi); |
|
|
int get_enable_downsized_cropped_roi(); |
|
|
void set_enable_zone_crop_1(int temp_enable_zone_crop_1); |
|
|
int get_enable_zone_crop_1(); |
|
|
|
|
|
extern void AssignPlateNumber(detection_pos* PosInfo, int total_element_size, int featureType); |
|
|
extern void ReplaceWithUTF8(detection_pos* PosInfo, int total_element_size); |
|
|
|
|
|
extern int check_if_enable_trigger_go_straight; |
|
|
|
|
|
extern int g_enable_person_for_metadata[MAX_DETECTION_ZONE]; |
|
|
|
|
|
int get_free_mem_data(); |
|
|
//int get_total_mem_data(); |
|
|
|
|
|
int get_g_check_if_show_parking(); |
|
|
|
|
|
void *run_fps_loading_thread(void *ptr); |
|
|
|
|
|
void *run_one_net_thread(void *ptr); |
|
|
#ifdef GY_OS_V_SERIES |
|
|
|
|
|
#else |
|
|
void *run_one_net_thread_anpr(void *ptr); |
|
|
#endif |
|
|
|
|
|
|
|
|
void *differ_image_thread(void *ptr); |
|
|
#if defined GY_OS_AMBA |
|
|
void *compute_median_thread(void *ptr); |
|
|
#endif |
|
|
#ifdef GY_OS_AMBA |
|
|
unsigned long get_ori_c_image(char *c_image); |
|
|
#endif |
|
|
//void *get_network_input_thread(void *ptr); |
|
|
|
|
|
#if 1 |
|
|
void use_sleep_to_adjust_sync_or_async(int tracking_channel_idx); |
|
|
#endif |
|
|
#ifdef GY_OS_AMBA |
|
|
void unlink_lilin_weight(); |
|
|
#endif |
|
|
int init_param(void *ptr); |
|
|
#ifdef GY_OS_AMBA |
|
|
int check_dsp_state(void); |
|
|
int map_dsp_buffer(int state); |
|
|
#endif |
|
|
#if 1 |
|
|
int start_all_nets(struct nnctrl_param *pctrl, struct amba_content *stAMBAcontent); |
|
|
#endif |
|
|
|
|
|
void clear_PostRecorderList(); |
|
|
void minus_count_trigger(); |
|
|
|
|
|
#if 1 |
|
|
int sort_detection_pos(const void *a, const void *b); |
|
|
int sort_detection_pos_CNT(const void *a, const void *b); |
|
|
int sort_detection_pos_USA(const void *a, const void *b); |
|
|
|
|
|
int sort_record_plate(const void *a, const void *b); |
|
|
int sort_record_object(const void *a, const void *b); |
|
|
int sort_record_post(const void *a, const void *b); |
|
|
void snap_hd_image(); |
|
|
|
|
|
int get_g_ori_yuv_width(); |
|
|
int get_g_ori_yuv_height(); |
|
|
|
|
|
void sync_cache_mem(unsigned long size, unsigned long phys, uint8_t clean, uint8_t invalid); |
|
|
|
|
|
void clean_output_mem(struct net_match* pnet); |
|
|
void invalid_output_mem(struct net_match *pnet); |
|
|
void clean_output_padding(struct net_match *pnet); |
|
|
#ifdef GY_OS_AMBA |
|
|
int process_output_mem(struct net_match *pnet); |
|
|
#endif |
|
|
int get_check_first_downsized_cropped_roi_for_object(); |
|
|
int get_g_check_if_all_existing(size_t index_zone); |
|
|
|
|
|
int get_g_check_if_NAND(size_t index_zone); |
|
|
void reset_g_Meta_If_Existing_for_NAND(size_t index_zone); |
|
|
unsigned int get_frame_id(); |
|
|
|
|
|
#if defined GY_OS_AMBA || defined GY_OS_NOVA |
|
|
int get_g_check_if_differ_image_is_running(); |
|
|
#endif |
|
|
#ifdef GY_OS_AMBA |
|
|
void set_change_status_for_not_AutoTracking_to_zero(); |
|
|
#endif |
|
|
int get_live_mode_flag(); |
|
|
|
|
|
int get_g_check_if_current_light_is_red(); |
|
|
|
|
|
#ifdef GY_OS_AMBA |
|
|
//int read_bin(char *fileDir, unsigned char *addr); |
|
|
int store_bin(char *file, int size, void *addr); |
|
|
#endif |
|
|
|
|
|
extern int bHttpServerMainStart; |
|
|
extern int bHttpServerThreadStart; |
|
|
|
|
|
extern int check_if_start_run_server; |
|
|
|
|
|
extern char g_device_name[512]; |
|
|
|
|
|
CPoint segmentsIntr(CPoint a, CPoint b, CPoint c, CPoint d); |
|
|
void build_g_parking_space_recording(int tracking_channel_idx, int index_zone); |
|
|
|
|
|
extern int g_parking_space_check_table[MAX_DETECTION_ZONE][MAX_SIZE_PARKING_SPACE]; |
|
|
extern int g_temp_parking_space_check_table[MAX_DETECTION_ZONE][MAX_SIZE_PARKING_SPACE]; |
|
|
extern float g_parking_space_recording_x[MAX_DETECTION_ZONE][MAX_SIZE_PARKING_SPACE]; |
|
|
extern float g_parking_space_recording_y[MAX_DETECTION_ZONE][MAX_SIZE_PARKING_SPACE]; |
|
|
extern time_t g_parking_space_update_time[MAX_DETECTION_ZONE][MAX_SIZE_PARKING_SPACE]; |
|
|
extern time_t g_parking_space_status_change_time[MAX_DETECTION_ZONE][MAX_SIZE_PARKING_SPACE]; |
|
|
|
|
|
extern float g_thres_bbox_stability; |
|
|
|
|
|
extern int g_IsPTZDevice; |
|
|
extern long g_osdSysTimeStamp; |
|
|
extern int g_check_if_OK_thermal; |
|
|
|
|
|
#ifdef GY_OS_NOVA |
|
|
extern int g_check_if_run_parse_json_data_from_bbox_receive; |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifdef GY_OS_AMBA |
|
|
//extern frameimage *tof_raw_arr; |
|
|
#endif |
|
|
|
|
|
float get_nms_thres(float nms_threshold); |
|
|
void set_metadata(); |
|
|
int check_if_existing_in_metaout(char *object_name, int index_zone); |
|
|
int check_if_existing_in_metaout_not_plate(char *object_name, int index_zone); |
|
|
int get_metadata1_num(int index_zone); |
|
|
int person_if_existing_in_metaout(int index_zone); |
|
|
char* get_meta_class(int index_meta, int index_zone); |
|
|
|
|
|
int check_if_object_in_ivs_zone(float obj_center_x, float obj_center_y, float obj_width, float obj_height, int image_width, int image_height, int enable_only_center); |
|
|
int check_if_object_in_zone(float obj_center_x, float obj_center_y, float obj_width, float obj_height, int image_width, int image_height, int enable_only_center); |
|
|
int check_if_object_in_zone_simple_version(detection_pos* pNext, int index_zone); |
|
|
int check_if_object_in_zone_simple_version_not_plate(detection_pos* pNext, int index_zone); |
|
|
int check_if_object_in_zone_width_zone(float obj_center_x, float obj_center_y, float obj_width, float obj_height, int image_width, int image_height, int enable_only_center, int index_zone); |
|
|
|
|
|
void set_desc_and_name_for_cloud(unsigned int trigger_type_int, char *temp_desc_cloud, char *temp_name_cloud); |
|
|
|
|
|
#ifdef GY_OS_AMBA |
|
|
void cropped_roi(detection_pos *pNext_plate, struct net_match *net_pair_orc, int current_index, char* snapshot_addr, size_t snapshot_size); |
|
|
void cropped_roi_ivs(detection_pos *pNext_plate, struct net_match *net_pair_orc, int current_index, char* snapshot_addr, size_t snapshot_size); |
|
|
#endif |
|
|
|
|
|
void run_ptz_server(); |
|
|
|
|
|
int get_g_counter_index_post(); |
|
|
int get_g_counter_index_long(); |
|
|
|
|
|
int get_try_once_ptz(); |
|
|
|
|
|
#endif |
|
|
#endif |