basic版本的yolo,在yolov3版本上增加人体跟踪
xuepengqiang
2020-05-26 5966f2b095841627d62daac0159e81f83544b85c
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);
    }
}