0b4cd5d5
Hu Chunming
完成轨迹定时抓拍
|
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
|
#ifndef ___COMMON_HEADER_H__
#define ___COMMON_HEADER_H__
#include <cmath>
#include <type_traits>
struct point_t {
int x, y;
};
struct box_t {
long id; // -1: placeholder.
float score;
int top, left, right, bottom, cls;
int width() const {
return std::max(0, right - left);
}
int height() const {
return std::max(0, bottom - top);
}
int cx() const {
return std::max(0, int((left + right) * 0.5f));
}
int cy() const {
return std::max(0, int((top + bottom) * 0.5f));
}
};
#endif // ___COMMON_HEADER_H__
|