vehicle_analysis.h 5.74 KB
/************************************************************
* Version: vehicle_analysis_v0.0.0.190311.gpuonly
* CopyRight: 中科视语(北京)科技有限公司
* UpdateDate: 20190311
* Content: drafting the first edition by 
************************************************************/

#ifndef VEHICLEANALYSIS_H_
#define VEHICLEANALYSIS_H_

#ifdef _MSC_VER
#ifdef VEHICLEANALYSIS_EXPORTS
#define VEHICLEANALYSIS_API __declspec(dllexport)
#else
#define VEHICLEANALYSIS_API __declspec(dllimport)
#endif
#else
#define VEHICLEANALYSIS_API __attribute__ ((visibility ("default")))
#endif


#include "sy_common.h"		                        //通用数据结构体定义
#include "vehicle_result.h"		                    //车辆分析结果结构体定义
#include <string>


#ifndef __VEHICLE_INFO__
#define __VEHICLE_INFO__
	typedef struct vehicle_info {                   	 //单车辆分析结果
		vd_result vehicle_detect_res;               	 //车(车头+车尾)检测结果
		vd_result vehicle_win_detect_res;            	//车窗检测结果
		vd_result vehicle_body_detect_res;           	 //车身检测结果
		vc_result vehicle_color_res;                 	//车颜色
		vr_result vehicle_recg_res;                 //车型识别
		vplate_results vehicle_plate_det_recg_res;   	 //车牌检测识别结果
		v_pendant_d_result vehicle_pendant_det_res;      //车属性
		vid_result vehicle_illegal_det_res;          	//车违规
		vf_result vehicle_fea_res;                   	//以车搜车
		//vs_result vehicle_special_res;               	//特殊品类车型(只有货车有输出结果)
		//mucktruckcover_result vehicle_mucktruckcover_res; //渣土车盖盖状态(车头:只有特殊品类车型中的渣土车和建筑垃圾车有输出结果,车尾:只有货车有输出结果)
		
		mta_result mta_res;                           //摩托车是否载人/摩托车驾驶人是否戴头盔/农用车是否载人

		manned_result manned_res;	 //是否是货车三轮车载人 0-不是货车/不是三轮车/三轮车未载人/货车未载人,1-货车载人,2-三轮车载人
				
	    int type;                                    //车的类别:0-车头,1-车尾,2-摩托车,3-三轮车	,4-车身	
		int vpt_type;
		int rainshed;		//是否安装雨棚, 0 有雨棚   1 无雨棚
				
		//int obj_quality_idx;//聚档数据类型:0-无效数据,1-低质数据,2-优质数据
	} vehicle_info;
#endif


#ifndef __VEHICLE_ANALYSIS_RESULT__
#define __VEHICLE_ANALYSIS_RESULT__
	typedef struct va_result {		                 //车辆分析结果 内存在外部申请
		vehicle_info info[100];				             //单车辆全部分析结果
		int count{0};					                 //车辆数量
	} va_result;                                     
#endif


#ifndef __DET_PARAM__
#define __DET_PARAM__
	typedef struct det_param                         //检测算法参数
	{
		int process_min_l;
		int process_max_l;
		float thresld;
	}det_param;
#endif


#ifndef __VA_PARAM__
#define __VA_PARAM__
	typedef struct va_param
	{
		//算法配置参数
		sy_command vehicle_detect_config;	   	        	 //是否启动车检测
		sy_command vehicle_recg_config;			      		 //是否启动车型识别
		sy_command vehicle_recg_supplement_config;			 //是否启动车型识别补充识别(车头车尾logo检测识别+车型15分类)(前提:启动车型识别vehicle_recg_config)
		sy_command vehicle_plate_det_recg_config;	  		 //是否启动车牌检测识别
		sy_command vehicle_color_config;			  		 //是否启动车辆颜色识别
		sy_command vehicle_pendant_det_config;		  		 //是否启动车辆属性识别
		sy_command vehicle_illegal_config;			  		 //是否启动车违规行为检测
		sy_command vehicle_feature_config;			   		 //是否启动车辆特征提取
		//sy_command vehicle_special_config;			   		 //是否启动特殊品类车型识别。(前提:启动车型识别vehicle_recg_config)
		//sy_command vehicle_image_quality_config;	         //是否启动车辆图像清晰度识别	
		sy_command vehicle_motor_tricycle_analysis_config;	 //是否启动摩托车三轮车分析(摩托车是否载人/摩托车驾驶人是否戴头盔/农用车是否载人)	
		//sy_command vehicle_motor_hs_output_config;			 //是否启动摩托车未戴头盔输出头肩坐标。(前提:启动摩托车三轮车分析vehicle_motor_tricycle_analysis_config)		
		//sy_command vehicle_stain_vp_config;	 				  //是否启动遮挡车牌识别	
		//sy_command vehicle_muck_truck_cover_config;			  //是否启动渣土车盖盖识别。(前提:开启特殊品类车型识别vehicle_special_config)
		//sy_command vehicle_lorry_manned_config;			      //是否启动货车载人识别。(前提:开启车型识别vehicle_recg_config)
		sy_command vehicle_manned_config;			      //是否启动货车、三轮车载人识别。(前提:开启车型识别vehicle_recg_config)

		
		//算法初始化参数
		int gpuid;                                      //指定显卡id
		float vehicle_det_thresld=0.5;      			     //车检测参数
		int min_obj_size=200;							//车头尾检测目标最小长边(建议取值范围100~200,长边小于该尺寸的过滤掉)
		float vehicle_plate_det_thresld=0.5;              //车牌检测参数
		float vehicle_attribute_det_thresld=0.5;          //车属性检测参数
		float vehicle_logo_det_thresld=0.1;              //车logo检测参数
		
		float vc_thresld=0.5;							//车颜色阈值
		char* dbPath;                                   //车型识别车型数据路路径 <当前仅支持英文路径>		
		char* models_Path;                               //所有模型的路径 <当前仅支持英文路径>//20210615
	}va_param;
#endif


#endif