You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
|
7 months ago
|
#define UDS_DET_MAGIC "UDSD" // 'UDS Detect'
|
||
|
|
#define UDS_DET_VERSION 1
|
||
|
|
|
||
|
|
|
||
|
|
#define UDS_TAG_DET 1
|
||
|
|
#define UDS_TAG_FIRE 2
|
||
|
|
#define UDS_TAG_FACE 3
|
||
|
|
#define UDS_TAG_LPR 4
|
||
|
|
|
||
|
|
// 4비트 tag + 12비트 class (원클래스 < 4096 가정)
|
||
|
|
#define UDS_ENC_CLS(tag, cls) ((uint16_t)((((tag) & 0xF) << 12) | ((cls) & 0x0FFF)))
|
||
|
|
#define UDS_DEC_TAG(c) ( (uint16_t)(((c) >> 12) & 0xF) )
|
||
|
|
#define UDS_DEC_LOCAL(c) ( (uint16_t)((c) & 0x0FFF) )
|
||
|
|
|
||
|
|
#define UDS_RESERVED_PACK(feat_mask, model_mask) \
|
||
|
|
(uint16_t)((((uint16_t)((feat_mask) & 0xFF)) << 8) | ((uint16_t)((model_mask) & 0xFF)))
|
||
|
|
|
||
|
|
#define UDS_RESERVED_GET_FEAT(x) ((uint8_t)(((x) >> 8) & 0xFF))
|
||
|
|
#define UDS_RESERVED_GET_MODEL(x) ((uint8_t)((x) & 0xFF))
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct __attribute__((packed)) {
|
||
|
|
char magic[4]; // "UDSD"
|
||
|
|
uint32_t version; // 1
|
||
|
|
uint32_t ch; // 채널
|
||
|
|
uint32_t seq; // 프레임 시퀀스(생산자가 부여)
|
||
|
|
uint64_t ts_ns; // 프레임 timestamp(ns)
|
||
|
|
uint32_t count; // 아래 객체 수
|
||
|
|
} uds_det_header_t;
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct __attribute__((packed)) {
|
||
|
|
float prob; // 신뢰도
|
||
|
|
float x, y, w, h; // bbox (원본 좌표계 기준; 네가 쓰는 좌표계 그대로)
|
||
|
|
uint16_t cls; // 클래스 id (없으면 0~N-1로 루프 인덱스 사용)
|
||
|
|
uint16_t tid;
|
||
|
|
uint16_t reserved; // 정렬용 or 향후 확장
|
||
|
|
} uds_det_entry_t;
|