xuepengqiang
2019-12-26 025429cbd5dd3dc6f130b8de07664665b0c4b55a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// 03_runing.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include "human_runing.h"
using namespace std;
 
int main()
{
    int rps = 10;
    int human_id = 1;
    //box的两个点坐标
    int x1 = 100;
    int y1 = 100;
    int x2 = 150;
    int y2 = 300;
    //摄像机标识 
    char cam_id = 'A';
    // 每一个相机都需要常见要给检测类,并且有对应的相机参数文件
    Human_Run CamA_HR(cam_id); //初始化摄像头信息
    cout << "Asd" << endl;
    double human_velocity;
    for (int i = 0; i < 40; ++i)
    {
        human_velocity = CamA_HR.get_human_velocity(rps, human_id, x1, y1, x2, y2);
        cout << "\nhuman_velocity::" <<human_velocity << endl;
        if(i<20)
        {
            x1++;
            x2++;
        }else{
            x1--;
            x2++;
        }
    }
//    Human_Run human(human_id,  x1, y1, x2, y2);
 
 
//    std::cout << human_A;
//    cout<<"Area="<<c.Area()<<endl;
    return 1;
}