/*
 * @Author: turboLIU
 * @Date: 2022-07-27 14:12:19
 * @LastEditTime: 2024-09-27 09:18:16
 * @Description: Do not edit
 * @FilePath: /C/include/detection_type_api.h
 */
#ifndef DETECTION_TYPE_API
#define DETECTION_TYPE_API


#define NMS_UNION 1
#define NMS_MIN 2
#include <string>
#include <vector>
#include "PlatformDefine.h"

namespace AIGO{



typedef enum{
    IR = 1,
    VIS = 2
}MODE;

typedef enum{
    CHW = 1,
    HWC = 2,
    WHC = 3,
}DATA_LAYOUT;

typedef enum{
    RGB = 1,
    BGR = 2,
    RGBA = 3,
    BGRA = 4,
    NV12 = 5, // uv
    NV21 = 6, // vu
}INPUT_LAYOUT;


typedef enum{
  AI_DT_UNDEFINED = -1,   //未知数据类型，默认值。
  AI_FLOAT = 0,
  AI_FLOAT16 = 1,
  AI_INT8 = 2,
  AI_INT32 = 3,
  AI_UINT8 = 4,
  AI_INT16 = 6,
  AI_UINT16 = 7,
  AI_UINT32 = 8,
  AI_INT64 = 9,
  AI_UINT64 = 10,
  AI_DOUBLE = 11,
  AI_BOOL = 12,
  AI_STRING = 13,
  AI_COMPLEX64 = 16,
  AI_COMPLEX128 = 17,
  AI_BF16 = 27
}DATATYPE;


typedef struct tag_ID_idx
{
    /* data */
    int x_loc;
    int y_loc;
    int z_loc;
    float score;
}ID_idx;

typedef struct tag_IDX
{
    /* data */
    float x;
    float y;
    float z;
    float score;
}IDX;


typedef struct tag_Objinfo
{
    /* data */
    float x1;
    float y1;
    float x2;
    float y2;
    float score;
    int classNum;
    int ID;
    int trackID;
    float area;

}objinfo;



typedef struct tag_ImgMat
{
    /* data */
    unsigned char* data=NULL;
    int width=0;
    int height=0;
    int depth=0;
    DATA_LAYOUT layout=HWC;
    INPUT_LAYOUT inlayout = RGB;
    int frameID=0;
    MODE mode = IR;
    // bool relayout=false;
    long long timestamp = 0;
    long long cfg = 0; // address of GD_VIDEO_FRAME_S structure 
}ImgMat;

typedef struct tag_TenMat
{
    /* data */
    void * data = nullptr;
    int width=0;
    int height=0;
    int depth=0;
    size_t dataByte=0;
    DATATYPE type;
    DATA_LAYOUT layout;
    int elementNum = 0;
    long long timestamp = 0;
}TenMat;

}
#endif