Kt_Irc_deal.h
3.8 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**
********************************************************************
* @file Kt_Irc_deal.h
* Kt_Irc_deal的头文件
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef KT_IRC_DEAL_H
#define KT_IRC_DEAL_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
typedef struct Kt_Irc_deal
{
int ImgDataBits; //图像位数
int ExpectedMax; //最大灰度值
int Gain; //对比度,这里设为 11
int LeftDrop; //低灰度舍弃点数,这里设为 5000
int RightDrop; //高灰度舍弃点数,这里设为 5000
//盲元数组,记录盲元的x y坐标
unsigned int *Blind;
unsigned int BlindNum; //记录盲元的个数
unsigned int BlindExtern;//盲元修正值,小于这个值需要修正,默认值为1000
//坏点数组,记录坏点像素坐标
unsigned int *BadPixel;
unsigned int BadPixelNum; //记录坏点的个数
unsigned int BadPixelExtern;//盲元修正值,小于这个值需要修正,默认值为1000
unsigned int *GrayPixel;
unsigned int GrayPixelNum; //记录坏点的个数
unsigned int GrayPixelExtern;//盲元修正值,小于这个值需要修正,默认值为1000
//单点校正(Single-Point Correction -> SPC)
double *SPC_Diff; // spc截距数组 即计算得到的增益
double *SPC_Slope; // spc斜率数组 即计算得到的补正
U16_t *SPC_Mark_Data;
unsigned int FirstSPC_flag; //第一次使用spc的标志位
unsigned int SPC_flag; //tpc开启标志
//两点矫正(Two-Point Correction -> TPC)
double *TPC_Diff; // tpc截距数组 即计算得到的增益
double *TPC_Slope; // tpc斜率数组 即计算得到的补正
unsigned int TPC_flag; //tpc开启标志
// 高低温标定
U16_t *HighT_NineFrameAdd; //高温温度判定时的9帧综合数组
U16_t *HighT_NineFrame_Avg; //高温温度判定时的9帧综合数组平均值
unsigned int HighT_flag; //高温判定标志 0~9 0关闭,1~9 为计数
U16_t *LowT_NineFrameAdd; //低温温度判断时的9帧综合数组
U16_t *LowT_NineFrame_Avg; //低温温度判定时的9帧综合数组平均值
unsigned int LowT_flag; //低温判定标志 0~9 0关闭,1~9 为计数
// 伪彩模式
unsigned int PseudoColorType; //伪彩模式
// 气体增强
U16_t *DGCE_Mark_Data; //标定帧灰度
U16_t *DGCE_Area; //显色区域
unsigned int DGCE_ColorType; //色彩模式 0 红 1 绿 2 蓝
unsigned int DGCE_CurSubMarkedMin; // 当前帧与标定帧的灰度值(均为 14 位)的最小差值 40
unsigned int DGCE_CurSubMarkedMax; // 当前帧与标定帧的灰度值(均为 14 位)的最大差值 240
unsigned int First_DGCE_flag;
unsigned int Width;
unsigned int Height;
unsigned int PixelNum; //像素个数
unsigned int OutputPixelColorMode; //输出色彩模式 0 默认模式 1 伪彩模式 2 气体增强模式
}Kt_Irc_deal;
/* Exported types ----------------------------- -------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode Kt_Irc_14bitGrayData_to_RawData(U8_t *data, int data_len, U8_t **yuv_data, int *yuv_data_len, struct Kt_Irc_deal *dealInfo, int rawType);
T_JZsdkReturnCode Kt_Irc_deal_Init(struct Kt_Irc_deal **index, int height, int width);
T_JZsdkReturnCode Set_GasThreshold(int flag, int num);
#ifdef __cplusplus
}
#endif
#endif