Commit 773018881ff102b001a218f6d9d83f9d68eaa302
1 parent
3e43f0c7
代码优化
Showing
2 changed files
with
1 additions
and
26 deletions
src/ai_engine_module/VehicleAnalysisDevice.cpp
@@ -828,14 +828,6 @@ int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result * | @@ -828,14 +828,6 @@ int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result * | ||
828 | LOG_DEBUG("1-2 vpd_process----- "); | 828 | LOG_DEBUG("1-2 vpd_process----- "); |
829 | vpd_result vpd_result_temp[car_body_num]; | 829 | vpd_result vpd_result_temp[car_body_num]; |
830 | vpd_result vpd_result_[car_body_num]; | 830 | vpd_result vpd_result_[car_body_num]; |
831 | - for(int b=0;b<car_body_num;b++) | ||
832 | - { | ||
833 | - vpd_result_temp[b].count = 0; | ||
834 | - vpd_result_temp[b].vpd_res=new vpd_info[OBJ_MAX_COUNT]; | ||
835 | - | ||
836 | - vpd_result_[b].count = 0; | ||
837 | - vpd_result_[b].vpd_res=new vpd_info[OBJ_MAX_COUNT]; | ||
838 | - } | ||
839 | 831 | ||
840 | int p_idx=0; | 832 | int p_idx=0; |
841 | for(int iter=0;iter<body_iter;iter++) | 833 | for(int iter=0;iter<body_iter;iter++) |
@@ -849,7 +841,6 @@ int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result * | @@ -849,7 +841,6 @@ int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result * | ||
849 | else | 841 | else |
850 | { | 842 | { |
851 | temp_batch=MAX_BATCHSIZE; | 843 | temp_batch=MAX_BATCHSIZE; |
852 | - //res_status=vpd_process10(tools->vpd_handle, vpd_img_data[iter], temp_batch, &vpd_result_temp[p_idx]); | ||
853 | res_status=vpd_process(tools->vpd_handle, vpd_img_data[iter], temp_batch, &vpd_result_temp[p_idx]); | 844 | res_status=vpd_process(tools->vpd_handle, vpd_img_data[iter], temp_batch, &vpd_result_temp[p_idx]); |
854 | } | 845 | } |
855 | 846 | ||
@@ -964,23 +955,7 @@ int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result * | @@ -964,23 +955,7 @@ int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result * | ||
964 | vpd_img_data = NULL; | 955 | vpd_img_data = NULL; |
965 | } | 956 | } |
966 | 957 | ||
967 | - //delete | ||
968 | - for(int b=0;b<car_body_num;b++) | ||
969 | - { | ||
970 | - if(vpd_result_temp[b].vpd_res !=NULL) | ||
971 | - { | ||
972 | - delete[] vpd_result_temp[b].vpd_res; | ||
973 | - vpd_result_temp[b].vpd_res = NULL; | ||
974 | - } | ||
975 | - | ||
976 | - if(vpd_result_[b].vpd_res !=NULL) | ||
977 | - { | ||
978 | - delete[] vpd_result_[b].vpd_res; | ||
979 | - vpd_result_[b].vpd_res = NULL; | ||
980 | - } | ||
981 | - } | ||
982 | LOG_DEBUG("1-2 vpd_process----- "); | 958 | LOG_DEBUG("1-2 vpd_process----- "); |
983 | - | ||
984 | } | 959 | } |
985 | } | 960 | } |
986 | LOG_DEBUG("body_num={} car_body_num={} motor_num={} tricycle_num={} ",body_num,car_body_num,motor_num,tricycle_num); | 961 | LOG_DEBUG("body_num={} car_body_num={} motor_num={} tricycle_num={} ",body_num,car_body_num,motor_num,tricycle_num); |
src/ai_engine_module/VehicleAnalysisDevice.h
@@ -45,7 +45,7 @@ const char * va_get_version(); | @@ -45,7 +45,7 @@ const char * va_get_version(); | ||
45 | * return: success(0) or error code(<0) | 45 | * return: success(0) or error code(<0) |
46 | * notes: null | 46 | * notes: null |
47 | *************************************************************************/ | 47 | *************************************************************************/ |
48 | -int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result); | 48 | +int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result); |
49 | 49 | ||
50 | 50 | ||
51 | 51 |