Blame view

src/ai_platform/common_header.h 719 Bytes
09c2d08c   Hu Chunming   arm交付版
1
2
3
4
5
  #ifndef ___COMMON_HEADER_H__
  #define ___COMMON_HEADER_H__
  
  #include <cmath>
  #include <type_traits>
746db74c   Hu Chunming   实现recode
6
  #include <string>
09c2d08c   Hu Chunming   arm交付版
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
  
  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));
    }
  };
  
  struct RecoderInfo {
746db74c   Hu Chunming   实现recode
35
36
37
38
    std::string recoderDir;
    std::string task_id;
    std::string object_id;
    unsigned long long frame_nb;
beec83ee   Hu Chunming   添加发送录制消息的线程
39
    std::string mq_info;
09c2d08c   Hu Chunming   arm交付版
40
41
42
  };
  
  #endif // ___COMMON_HEADER_H__