1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| //
| // Created by Scheaven on 2020/4/20.
| //
|
| #include "result_util.h"
|
| void switch_result(DETECTIONS& detections, FRAME_RESULT& results_vec)
| {
| DETECTBOX tmpbox;
| for (auto &detection : detections)
| {
| RESULT_STRUCT result;
| tmpbox = detection.tlwh;
| result.rect = cv::Rect(tmpbox(0), tmpbox(1), tmpbox(2), tmpbox(3));
| result.confidence = detection.confidence;
| // std::cout << result.rect << std::endl;
| results_vec.push_back(result);
| }
| }
|
|