Commit 3f4b245b0490724ee5121cb75f59e8fe6a2aaa5c

Authored by Hu Chunming
1 parent 5259cfc1

更新demo

Showing 1 changed file with 9 additions and 9 deletions
src/demo/main.cpp
@@ -72,20 +72,20 @@ int main() { @@ -72,20 +72,20 @@ int main() {
72 72
73 73
74 vector<string> vec_path; 74 vector<string> vec_path;
75 - GetFileNames("/home/share/data/villiage_test/test3", vec_path); 75 + // GetFileNames("/home/share/data/villiage_test/test3", vec_path);
76 76
77 // vec_path = GetFilesFromFile("./files1.log"); 77 // vec_path = GetFilesFromFile("./files1.log");
78 78
79 - // {  
80 - // string path = "./img/test_road2.jpg";  
81 - // vec_path.push_back(path);  
82 - // } 79 + {
  80 + string path = "/home/share/data/villiage_test/test3/192.168.10.67_01_20230601160330100_15.jpg";
  81 + vec_path.push_back(path);
  82 + }
83 83
84 size_t last_recoder = 0; 84 size_t last_recoder = 0;
85 int index = 0; 85 int index = 0;
86 int max_value = vec_path.size(); 86 int max_value = vec_path.size();
87 87
88 - while (true) 88 + // while (true)
89 { 89 {
90 // for (size_t i = 0; i < vec_path.size(); i++) 90 // for (size_t i = 0; i < vec_path.size(); i++)
91 { 91 {
@@ -94,10 +94,10 @@ int main() { @@ -94,10 +94,10 @@ int main() {
94 94
95 vector<string> vec_file_name; 95 vector<string> vec_file_name;
96 vec_file_name.push_back(vec_path[first_index]); 96 vec_file_name.push_back(vec_path[first_index]);
97 - vec_file_name.push_back(vec_path[second_index]); 97 + // vec_file_name.push_back(vec_path[second_index]);
98 98
99 std::vector<AnalysisResult> result = village_pic_analysis_file(vaHandle, vec_file_name); 99 std::vector<AnalysisResult> result = village_pic_analysis_file(vaHandle, vec_file_name);
100 - // show_result(result, vec_path); 100 + show_result(result, vec_path);
101 101
102 size_t cur_recoder = GetDeviceMem(0); 102 size_t cur_recoder = GetDeviceMem(0);
103 if (cur_recoder > last_recoder) 103 if (cur_recoder > last_recoder)
@@ -187,7 +187,7 @@ void show_result(std::vector&lt;AnalysisResult&gt; result, vector&lt;string&gt; vec_path){ @@ -187,7 +187,7 @@ void show_result(std::vector&lt;AnalysisResult&gt; result, vector&lt;string&gt; vec_path){
187 } 187 }
188 LOG_INFO(" 号牌号码:{}{}{}{}{}{}{}{}", plate_info.recg[0].character, plate_info.recg[1].character, plate_info.recg[2].character, plate_info.recg[3].character, plate_info.recg[4].character, plate_info.recg[5].character, plate_info.recg[6].character, plate_info.recg[7].character); 188 LOG_INFO(" 号牌号码:{}{}{}{}{}{}{}{}", plate_info.recg[0].character, plate_info.recg[1].character, plate_info.recg[2].character, plate_info.recg[3].character, plate_info.recg[4].character, plate_info.recg[5].character, plate_info.recg[6].character, plate_info.recg[7].character);
189 LOG_INFO(" 号牌可信度:{}", plate_info.detect_score); 189 LOG_INFO(" 号牌可信度:{}", plate_info.detect_score);
190 - LOG_INFO(" 每位号牌可信度:{}:{} {}:{} {}:{} {}:{} {}:{} {}:{} {}:{} {}:{}", plate_info.recg[0].character, plate_info.recg[0].maxprob, plate_info.recg[1].character, plate_info.recg[1].maxprob, plate_info.recg[2].character, plate_info.recg[2].maxprob, plate_info.recg[3].character, plate_info.recg[3].maxprob, plate_info.recg[4].character, plate_info.recg[4].maxprob, plate_info.recg[5].character, plate_info.recg[5].maxprob, plate_info.recg[6].character, plate_info.recg[6].maxprob, plate_info.recg[7].character, plate_info.recg[7].maxprob); 190 + LOG_INFO(" 每位号牌可信度: {}:{} {}:{} {}:{} {}:{} {}:{} {}:{} {}:{} {}:{}", plate_info.recg[0].character, plate_info.recg[0].maxprob, plate_info.recg[1].character, plate_info.recg[1].maxprob, plate_info.recg[2].character, plate_info.recg[2].maxprob, plate_info.recg[3].character, plate_info.recg[3].maxprob, plate_info.recg[4].character, plate_info.recg[4].maxprob, plate_info.recg[5].character, plate_info.recg[5].maxprob, plate_info.recg[6].character, plate_info.recg[6].maxprob, plate_info.recg[7].character, plate_info.recg[7].maxprob);
191 LOG_INFO(" 车辆类型分类:{}", vehicle_type[info[j].vpt_type]); 191 LOG_INFO(" 车辆类型分类:{}", vehicle_type[info[j].vpt_type]);
192 } else { 192 } else {
193 LOG_INFO("行人特征"); 193 LOG_INFO("行人特征");