93 lines
2.0 KiB
C++
93 lines
2.0 KiB
C++
|
||
#ifndef TB_GLOBALS_H
|
||
#define TB_GLOBALS_H
|
||
|
||
#include "../globals/algoGlobals.h"
|
||
#include <vector>
|
||
#include <cmath>
|
||
#include <algorithm>
|
||
#include <cstring>
|
||
#include <iostream>
|
||
#include <fstream>
|
||
|
||
typedef struct
|
||
{
|
||
uint16_t L;
|
||
uint16_t T;
|
||
uint16_t W;
|
||
uint16_t H;
|
||
uint32_t FrmNo;
|
||
uint32_t TimeStamp;
|
||
uint32_t encInfo;
|
||
}Luma_frameInfo;
|
||
|
||
typedef struct
|
||
{
|
||
uint16_t WinRdx;//窗口在图像内的起始坐标
|
||
uint16_t y; //y坐标
|
||
uint16_t Rid; //region的ID
|
||
uint8_t Flag; //bit0是overlap标志。bit1是反光信号标志
|
||
uint8_t PeakRltvRdx; //peak在窗口内的的相对坐标,低4位是起始坐标,高4位是结束坐标
|
||
uint8_t data[RGN_DATA_WIN_SIZE];
|
||
//double offset;
|
||
}Luma_rgnData;
|
||
|
||
typedef struct
|
||
{
|
||
uint16_t WinRdx;//窗口在图像内的起始坐标
|
||
uint16_t y; //y坐标
|
||
uint16_t Rid; //region的ID
|
||
uint8_t Flag; //bit0是overlap标志。bit1是反光信号标志
|
||
uint8_t pkValue;
|
||
int32_t nD1;
|
||
int32_t nD2;
|
||
}Luma_convolveData;
|
||
|
||
typedef struct
|
||
{
|
||
float x;
|
||
uint16_t y; //y坐标
|
||
uint16_t Rid; //region的ID
|
||
uint8_t Flag; //bit0是overlap标志。bit1是反光信号标
|
||
uint8_t pkValue;
|
||
uint8_t Sync;
|
||
}Luma_rgnSubpix;
|
||
|
||
|
||
typedef struct
|
||
{
|
||
float x;
|
||
float y; //y坐标
|
||
uint16_t Rid; //region的ID
|
||
uint8_t Flag; //bit0是overlap标志。bit1是反光信号标
|
||
uint8_t pkValue;
|
||
uint8_t sync;
|
||
}Luma_rgnSubpixCalib;
|
||
|
||
#pragma pack(push, 1)
|
||
typedef struct {
|
||
uint16_t file_type; // 文件类型,'BM'
|
||
uint32_t file_size; // 文件大小
|
||
uint16_t reserved1; // 保留字段
|
||
uint16_t reserved2;
|
||
uint32_t offset_data; // 数据偏移
|
||
}BMPFileHeader;
|
||
|
||
typedef struct {
|
||
uint32_t size; // 信息头大小(40字节)
|
||
int32_t width; // 图像宽度
|
||
int32_t height; // 图像高度(正数表示倒序)
|
||
uint16_t planes; // 颜色平面数(必须为1)
|
||
uint16_t bit_count; // 每像素位数(24)
|
||
uint32_t compression; // 压缩方式(0表示无压缩)
|
||
uint32_t size_image; // 像素数据大小
|
||
int32_t x_pixels_per_meter;
|
||
int32_t y_pixels_per_meter;
|
||
uint32_t colors_used;
|
||
uint32_t colors_important;
|
||
} BMPInfoHeader;
|
||
#pragma pack(pop)
|
||
|
||
|
||
#endif
|