36. Statistical Information

36.1. Overview

thischaptersectiondescription ISP provide 3A statistical information, andconfigurationmethod.

36.2. API Reference

systemstatisticalsignalmessage interfacemustneedincall CVI_ISP_Init interfaceofafteronly thencancall.

36.2.1. CVI_ISP_SetStatisticsConfig

[Description]

Set ISP statistical information configuration.

[Syntax]

CVI_S32 CVI_ISP_SetStatisticsConfig(VI_PIPE ViPipe, const ISP_STATISTICS_CFG_S *pstStatCfg);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstStatCfg

ISP statistical information configuration

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None.

[Example]

// Set AE / AWB / AF related statistic window setting
VI_PIPE ViPipe = 0;
ISP_STATISTICS_CFG_S stsCfg;

// 设定AE0 windows ROI.
stsCfg.stAECfg.stCrop[0].bEnable = 1;
stsCfg.stAECfg.stCrop[0].u16X = stsCfg.stAECfg.stCrop[0].u16Y = 0;
stsCfg.stAECfg.stCrop[0].u16W = 1920;
stsCfg.stAECfg.stCrop[0].u16H = 1080;

// 设定AWB统计值在x & y方向的window数.
stsCfg.stWBCfg.u16ZoneRow = AWB_ZONE_ORIG_ROW;
stsCfg.stWBCfg.u16ZoneCol = AWB_ZONE_ORIG_COLUMN;

// 设定AWB window ROI.
stsCfg.stWBCfg.stCrop.u16X = stsCfg.stWBCfg.stCrop.u16Y = 0;
stsCfg.stWBCfg.stCrop.u16W = 1920;
stsCfg.stWBCfg.stCrop.u16H = 1080;

// 设定AWB统计亮度的阈值.
stsCfg.stWBCfg.u16BlackLevel = 0;
stsCfg.stWBCfg.u16WhiteLevel = 4095;

// 设定AF统计值开关.
stsCfg.stFocusCfg.stConfig.bEnable = 1;

// 设定AF统计的前处理开关
stsCfg.stFocusCfg.stConfig.stRawCfg.PreGammaEn = 0;
stsCfg.stFocusCfg.stConfig.stPreFltCfg.PreFltEn = 1;

// 设定AF统计值在 x & y方向的window数
stsCfg.stFocusCfg.stConfig.u16Hwnd = 17;
stsCfg.stFocusCfg.stConfig.u16Vwnd = 15;

// 设定AF window ROI.
stsCfg.stFocusCfg.stConfig.stCrop.bEnable = 1;
stsCfg.stFocusCfg.stConfig.stCrop.u16X = AF_XOFFSET_MIN;
stsCfg.stFocusCfg.stConfig.stCrop.u16Y = AF_YOFFSET_MIN;
stsCfg.stFocusCfg.stConfig.stCrop.u16W = 1920 - AF_XOFFSET_MIN * 2;
stsCfg.stFocusCfg.stConfig.stCrop.u16H = 1080 - AF_YOFFSET_MIN * 2;

// 设定AF水平方向低通滤波器系数.
stsCfg.stFocusCfg.stConfig.u8HFltShift = 1;
stsCfg.stFocusCfg.stConfig.s8HVFltLpCoeff[0] = 1;
stsCfg.stFocusCfg.stConfig.s8HVFltLpCoeff[1] = 2;
stsCfg.stFocusCfg.stConfig.s8HVFltLpCoeff[2] = 3;
stsCfg.stFocusCfg.stConfig.s8HVFltLpCoeff[3] = 5;
stsCfg.stFocusCfg.stConfig.s8HVFltLpCoeff[4] = 10;

// 设定AF水平方向高通滤波器系数.
stsCfg.stFocusCfg.stHParam_FIR0.s8HFltHpCoeff[0] = 0;
stsCfg.stFocusCfg.stHParam_FIR0.s8HFltHpCoeff[1] = 0;
stsCfg.stFocusCfg.stHParam_FIR0.s8HFltHpCoeff[2] = 13;
stsCfg.stFocusCfg.stHParam_FIR0.s8HFltHpCoeff[3] = 24;
stsCfg.stFocusCfg.stHParam_FIR0.s8HFltHpCoeff[4] = 0;

// 设定AF垂直方向高通滤波器系数.
stsCfg.stFocusCfg.stVParam_FIR.s8VFltHpCoeff[0] = 13;
stsCfg.stFocusCfg.stVParam_FIR.s8VFltHpCoeff[1] = 24;
stsCfg.stFocusCfg.stVParam_FIR.s8VFltHpCoeff[2] = 0;

// 设定各统计值取值开关.
stsCfg.unKey.bit1FEAeGloStat = stsCfg.unKey.bit1FEAeLocStat =
stsCfg.unKey.bit1AwbStat1 = stsCfg.unKey.bit1AwbStat2 = stsCfg.unKey.bit1FEAfStat = 1;

CVI_ISP_SetStatisticsConfig(ViPipe, &stsCfg);

 // 设定AF低通滤波器系数规则.
 AF低通滤波器拥有九个参数 {x0, x1, x2, x3, x4, x5, x6, x7, x8} ,
 最后四个参数与前四个参数对称(x0 = x8, x1 = x7, x2 = x6, x3 = x5) ,
 使用者只须设置前五个参数(x0 ~ x5)即可
 // 设定AF水平高通滤波器系数规则.
 AF水平高通滤波器拥有九个参数 {x0, x1, x2, x3, x4, x5, x6, x7, x8} ,
 最后四个参数与前四个参数 ,
 数字相同但正负符号相反 (x0 = -x8, x1 = -x7, x2 = -x6, x3 = -x5) ,
 使用者只须设置前五个参数(x0 ~ x5)即可
 // 设定AF垂直高通滤波器系数规则.
 AF水平高通滤波器拥有五个参数 {x0, x1, x2, x3, x4} ,
 最后两个参数与前两个参数 ,
 数字相同但正负符号相反 (x0 = -x4, x1 = -x3) ,
 使用者只须设置前三个参数(x0 ~ x2)即可

filterparameternumbersettingsrangeexample

filtercanthrough frequencyband

filterparameternumberx0

filterparameternumberx1

filterparameternumberx2

0.1 ~ 0.2

20

16

0

0.1 ~ 0.5

17

20

0

0.1 ~ 0.6

13

24

0

0.1 ~ 0.7

12

25

0

0.1 ~ 0.8

-10

-27

0

0.2 ~ 0.9

-10

27

0

[Related Topics]

36.2.2. CVI_ISP_GetStatisticsConfig

[Description]

Get ISP statistical information configuration.

[Syntax]

CVI_S32 CVI_ISP_GetStatisticsConfig(VI_PIPE ViPipe, ISP_STATISTICS_CFG_S *pstStatCfg);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstStatCfg

ISP statistical information configuration

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None.

[Example]

None.

[Related Topics]

36.2.3. CVI_ISP_GetAEStatistics

[Description]

Get ISP AEstatistical information

[Syntax]

CVI_S32 CVI_ISP_GetAEStatistics(VI_PIPE ViPipe, ISP_AE_STATISTICS_S *pstAeStat);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstAeStat

AEstatistical information output

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None.

[Example]

//设定 AE window weight
#define AE_ZONE_ROW 15
#define AE_ZONE_COLUMN 17

ISP_AE_WIN_STATISTICS_CFG_S  aeWinCfg;
CVI_U8 i,j;
VI_PIPE ViPipe = 0;
CVI_U8 u8Weighttable[AE_ZONE_ROW][ AE_ZONE_COLUMN]={
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 },
{ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 8, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 8, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 8, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 8, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 8, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 1 },
{ 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 1 },
{ 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 1 },
{ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1 },};

CVI_ISP_GetAEWinStatistics(ViPipe, &aeWinCfg);
for (i = 0; i < AE_ZONE_ROW; i++)
{
   for (j = 0; j < AE_ZONE_COLUMN; j++)
   {
      aeWinCfg.au8Weight[i][j] = u8Weighttable[i][j];
   }
}
CVI_ISP_SetAEWinStatistics(ViPipe, &aeWinCfg);

[Related Topics]

None.

36.2.4. CVI_ISP_GetWBStatistics

[Description]

Get ISP AWBstatistical information

[Syntax]

CVI_S32 CVI_ISP_GetWBStatistics(VI_PIPE ViPipe, ISP_WB_STATISTICS_S *pstAwbStat);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstAwbStat

AWBstatistical information

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None.

[Example]

None.

[Related Topics]

None.

36.2.5. CVI_ISP_GetFocusStatistics

[Description]

GetISP AFstatistical information

[Syntax]

CVI_S32 CVI_ISP_GetFocusStatistics(VI_PIPE ViPipe, ISP_AF_STATISTICS_S *pstAfStat);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstAfStat

AFstatistical information

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None.

[Example]

None.

[Related Topics]

None.

36.3. Data Types

36.3.1. ISP_STATISTICS_CTRL_U

[Description]

Define ISP systemstatisticalvalueinformationEnable

[Definition]

typedef union _ISP_STATISTICS_CTRL_U {
   CVI_U64 u64Key;
   struct {
       CVI_U64 bit1FEAeGloStat : 1; /* [0] */
       CVI_U64 bit1FEAeLocStat : 1; /* [1] */
       CVI_U64 bit1AwbStat1 : 1; /* [2] */
       CVI_U64 bit1AwbStat2 : 1; /* [3] */
       CVI_U64 bit1FEAfStat : 1; /* [4] */
       CVI_U64 bit14Rsv : 59; /* [5:63] */
   }
} ISP_STATISTICS_CTRL_U;

[Members]

Member Name

Description

bit1FEAeGloStat

AEglobalsystemstatisticalvalueEnable

bit1FEAeLocStat

AEblocksystemstatisticalvalueEnable

bit1AwbStat1

AWBglobalsystemstatisticalvalueEnable

bit1AwbStat2

AWBblocksystemstatisticalvalueEnable

bit1FEAfStat

AFblocksystemstatisticalvalueEnable

bit14Rsv

reservedposition

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.2. ISP_AE_STATISTICS_CFG_S

[Description]

AE statistical information configuration

[Definition]

typedef struct _ISP_AE_STATISTICS_CFG_S {
   CVI_BOOL bHisStatisticsEnable; /*RW; Range:[0x0,0x1]*/
   ISP_AE_CROP_S stCrop[AE_MAX_NUM];
   ISP_AE_FACE_CROP_S stFaceCrop[FACE_WIN_NUM];
   CVI_BOOL fast2A_ena; /*RW; Range:[0x0,0x1]*/
   CVI_U8 fast2A_ae_low; /*RW; Range:[0x0,0xFF]*/
   CVI_U8 fast2A_ae_high; /*RW; Range:[0x0,0xFF]*/
   CVI_U16 fast2A_awb_top; /*RW; Range:[0x0,0xFFF]*/
   CVI_U16 fast2A_awb_bot; /*RW; Range:[0x0,0xFFF]*/
   CVI_U16 over_exp_thr; /*RW; Range:[0x0,0x3FF]*/
   CVI_U8 au8Weight[AE_WEIGHT_ZONE_ROW][AE_WEIGHT_ZONE_COLUMN]; /*RW; Range:[0x0, 0xF]*/
} ISP_AE_STATISTICS_CFG_S;

[Members]

Member Name

Description

enAESwitch

HiSilicon-compatibleparameternumber, Currently unused

stHistConfig

HiSilicon-compatibleparameternumber, Currently unused

enFourPlaneMode

HiSilicon-compatibleparameternumber, Currently unused

enHistMode

HiSilicon-compatibleparameternumber, Currently unused

enAverMode

HiSilicon-compatibleparameternumber, Currently unused

enMaxGainMode

HiSilicon-compatibleparameternumber, Currently unused

stCrop[AE_MAX_NUM];

AEsystemstatisticalvalueInputimagecropsettings

au8Weight[AE_ZONE_ROW][AE_ZONE_COLUMN]

AE window 17 x 15 weightsettings

bHisStatisticsEnable

AE/Hist sts Enable

u8StatisticsShiftBits

AE systemstatisticalvalueneedreducesmallseveral bit

u16RGain

R channelwhetherthroughthrough RGain

u16GGain

G channelwhetherthroughthrough GGain

u16BGain

B channelwhetherthroughthrough BGain

[Related Data Types and Interfaces]

  • CVI_ISP_SetAEWinStatistics

36.3.3. ISP_AE_CROP_S

[Description]

AEsystemstatisticalvalueInputimagecropsettings

[Definition]

typedef struct _ ISP_AE_CROP_S {
   CVI_BOOL bEnable;
   CVI_U16 u16X;
   CVI_U16 u16Y;
   CVI_U16 u16W;
   CVI_U16 u16H;
} ISP_AE_CROP_S;

[Members]

Member Name

Description

bEnable

CropEnable, 0isnotEnable, willset setwhole imageimageoperationiscropsettings, 1isEnable

u16X

CropXstart position, valueneedlargein0

u16Y

CropYstart position, valueneedlargein0

u16W

Cropwidth

u16H

Cropheight

[Precautions]

None

[Related Data Types and Interfaces]

None.

36.3.4. ISP_AE_FACE_CROP_S

[Description]

AE facesystemstatisticalvalueInputimagecropsettings

[Definition]

 typedef struct _ISP_AE_FACE_CROP_S {
  CVI_BOOL bEnable; /*RW; Range:[0x0,0x1]*/
  CVI_U16 u16X; /*RW; Range:[0x00,0x1FFF]*/
  CVI_U16 u16Y; /*RW; Range:[0x00,0x1FFF]*/
  CVI_U8 u16W; /*RW; Range:[0x00,0xFF]*/
  CVI_U8 u16H; /*RW; Range:[0x00,0xFF]*/
} ISP_AE_FACE_CROP_S;

[Members]

Member Name

Description

bEnable

CropEnable, 0isnotEnable, willset setwhole imageimageoperationiscropsettings, 1isEnable

u16X

CropXstart position, valueneedlargein0

u16Y

CropYstart position, valueneedlargein0

u16W

Cropwidth

u16H

Cropheight

[Precautions]

None

[Related Data Types and Interfaces]

None.

36.3.5. ISP_WB_STATISTICS_CFG_S

[Description]

WB statistical information configuration

[Definition]

typedef struct _ISP_WB_STATISTICS_CFG_S {
   ISP_AWB_SWITCH_E enAWBSwitch;
   CVI_U16 u16ZoneRow;
   CVI_U16 u16ZoneCol;
   CVI_U16 u16ZoneBin;
   CVI_U16 au16HistBinThresh[4];
   CVI_U16 u16WhiteLevel;
   CVI_U16 u16BlackLevel;
   CVI_U16 u16CbMax;
   CVI_U16 u16CbMin;
   CVI_U16 u16CrMax;
   CVI_U16 u16CrMin;
   ISP_AWB_CROP_S stCrop;
} ISP_WB_STATISTICS_CFG_S;

[Members]

Member Name

Description

enAWBSwitch

ISP_AWB_AFTER_DG = 0
ISP_AWB_AFTER_Expander,
ISP_AWB_AFTER_DRC,
ISP_AWB_SWITCH_BUTT
settingsAWB block location

u16ZoneRow

AWBsystemstatisticalwindowlinenumber

u16ZoneCol

AWBsystemstatisticalwindowcolumnnumber

u16ZoneBin

HiSilicon-compatibleparameternumber , Currently unused

au16HistBinThresh

HiSilicon-compatibleparameternumber , Currently unused

u16WhiteLevel

AWBbrightpointexclude ThresholdSet

u16BlackLevel

AWBdarkpointexclude ThresholdSet

u16CbMax

differentISOunderR/Gmaximum value

u16CbMin

differentISOunderR/Gminimum value

u16CrMax

differentISOunderB/Gmaximum value

u16CrMin

differentISOunderB/Gminimum value

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.6. ISP_AWB_CROP_S

[Description]

AWBsystemstatisticalvalueInputimagecropsettings

[Definition]

typedef struct _ISP_ AWB_CROP_S {
   CVI_BOOL bEnable;
   CVI_U16 u16X;
   CVI_U16 u16Y;
   CVI_U16 u16W;
   CVI_U16 u16H;
} ISP_AWB_CROP_S;

[Members]

Member Name

Description

bEnable

C ropEnable, falsesuch as0isnotEnable, willSetwhole imageimageoperationiscropsettings, falsesuch as1isEnable

u16X

CropXstart position, valueneedlargein0

Value Range: [0, imagewidth - 16 * u16ZoneCol]

u16Y

CropYstart position, valueneedlargein0

Value Range: [0, imageheight - 16 * u16ZoneRow]

u16W

Cropwidth

Value Range: [16 * u16ZoneCol, imagewidth]

u16H

Cropheight

Value Range: [0, imagewidth - 16 * u16ZoneCol]

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.7. ISP_WB_STATISTICS_S

[Description]

Define AWBstatistical information

[Definition]

typedef struct _ISP_WB_STATISTICS_S {
   CVI_U16 u16GlobalR;
   CVI_U16 u16GlobalG;
   CVI_U16 u16GlobalB;
   CVI_U16 u16CountAll;
   CVI_U16 au16ZoneAvgR[AWB_ZONE_NUM];
   CVI_U16 au16ZoneAvgG[AWB_ZONE_NUM];
   CVI_U16 au16ZoneAvgB[AWB_ZONE_NUM];
   CVI_U16 au16ZoneCountAll[AWB_ZONE_NUM];
   ISP_AWB_GRID_INFO_S stGridInfo;
} ISP_WB_STATISTICS_S;

宏定义
#define AWB_ZONE_ORIG_ROW (32)
#define AWB_ZONE_ORIG_COLUMN (64)
#define AWB_ZONE_NUM (AWB_ZONE_ORIG_ROW * AWB_ZONE_ORIG_COLUMN)

[Members]

Member Name

Description

u16GlobalR

BayerdomainglobalRcomponent averagevalue

Value Range: [0, 0x3ff]

Data Types: CVI_BOOL

u16GlobalG

BayerdomainglobalGcomponent averagevalue

Value Range: [0, 0x3ff]

Data Types: CVI_BOOL

u16GlobalB

BayerdomainglobalBcomponent averagevalue

Value Range: [0, 0x3ff]

Data Types: CVI_BOOL

u16CountAll

globalsystemstatisticalregion pixelnumber

Value Range: [0, 0xffff]

Data Types: CVI_BOOL

au16ZoneAvgR

BayerdomainpartregionintervalRcomponent averagevalue

Value Range: [0, 0x3ff]

Data Types: CVI_BOOL

au16ZoneAvgG

BayerdomainpartregionintervalGcomponent averagevalue

Value Range: [0, 0x3ff]

Data Types: CVI_BOOL

au16ZoneAvgB

BayerdomainpartregionintervalBcomponent averagevalue

Value Range: [0, 0x3ff]

Data Types: CVI_BOOL

au16ZoneCountAll

Bayerdomainpartregioninterval pixelnumber

Value Range: [0, 0xfff]

Data Types: CVI_BOOL

ISP_AWB_GRID_INFO_S

AWBstatistical informationcoordinatesinformation

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.8. ISP_AWB_GRID_INFO_S

[Description]

AWBstatistical informationcoordinatesinformation

[Definition]

typedef struct _ISP_AWB_GRID_INFO_S {
   CVI_U16 au16GridYPos[AWB_ZONE_ORIG_ROW + 1];
   CVI_U16 au16GridXPos[AWB_ZONE_ORIG_COLUMN + 1];
   CVI_U8 u8Status;
} ISP_AWB_GRID_INFO_S;

宏定义
#define AWB_ZONE_ORIG_ROW (32)
#define AWB_ZONE_ORIG_COLUMN (32)

[Members]

Member Name

Description

au16GridYPos

not yetuse

au16GridXPos

not yetuse

u8Status

not yetuse

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.9. ISP_FOCUS_STATISTICS_CFG_S

[Description]

AFstatistical information configuration

[Definition]

typedef struct _ISP_FOCUS_STATISTICS_CFG_S {
   ISP_AF_CFG_S stConfig;
   ISP_AF_H_PARAM_S stHParam_FIR0;
   ISP_AF_H_PARAM_S stHParam_FIR1;
   ISP_AF_V_PARAM_S stVParam_FIR;
} ISP_FOCUS_STATISTICS_CFG_S;

[Members]

Member Name

Description

stConfig

AFglobalconfigurationparameternumber

stHParam_FIR0

horizontalfilterfirstgroupFIRparameternumberSet

stHParam_FIR1

horizontalfiltersecondgroupFIRparameternumberSet

stVParam_FIR

verticalfilterFIRparameternumberSet

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.10. ISP_AF_CFG_S

[Description]

Define AFsystemstatisticalvalueparameternumberconfiguration

[Definition]

typedef struct _ISP_AF_CFG_S {
   CVI_BOOL bEnable;
   CVI_U16 u16Hwnd; /*RW; Range:[0x2, 0x11]*/
   CVI_U16 u16Vwnd; /*RW; Range:[0x2, 0xF]*/
   CVI_U8 u8HFltShift; /*RW; Range:[0x0, 0xF]*/
   CVI_S8 s8HVFltLpCoeff[FIR_H_GAIN_NUM]; /*RW; Range:[0x0, 0x1F]*/
   ISP_AF_RAW_CFG_S stRawCfg;
   ISP_AF_PRE_FILTER_CFG_S stPreFltCfg;
   ISP_AF_CROP_S stCrop;
   CVI_U8 H0FltCoring; /*RW; Range:[0x0, 0xFF]*/
   CVI_U8 H1FltCoring; /*RW; Range:[0x0, 0xFF]*/
   CVI_U8 V0FltCoring; /*RW; Range:[0x0, 0xFF]*/
   CVI_U16 u16HighLumaTh; /*RW; Range:[0x0, 0xFF]*/
   CVI_U8 u8ThLow;
   CVI_U8 u8ThHigh;
   CVI_U8 u8GainLow; /*RW; Range:[0x0, 0xFE]*/
   CVI_U8 u8GainHigh; /*RW; Range:[0x0, 0xFE]*/
   CVI_U8 u8SlopLow; /*RW; Range:[0x0, 0xF]*/
   CVI_U8 u8SlopHigh; /*RW; Range:[0x0, 0xF]*/
} ISP_AF_CFG_S;

[Members]

Member Name

Description

bEnable

AFEnable, 0isnotEnable, 1isEnable

u16Hwnd

AFhorizontaldirectionwindownumber, maximumcanSetis17

Value Range: [0x2, 0x11]

Data Types: CVI_U16

u16Vwnd

AFverticalhistogramtowindownumber, maximumcanSetis15

Value Range: [0x2, 0xf]

Data Types: CVI_U16

u8HFltShift

AFlowpassfiltersystemstatisticalvaluemovepositionregistervalue

Value Range : [0, 16]

Data Types: CVI_U8

s8HVFltLpCoeff[FIR_H_GAIN_NUM]

AF lowpassfiltersystemnumber, useinControlFIRfilter frequencyresponse

Value Range : [-32, 31]

Data Types: CVI_S8

stRawCfg

AF Bayerdomainrelatedconfiguration

stPreFltCfg

AFprefilteringprocessingEnablesettings

stCrop

AFInput Image Croppingconfiguration

u16HighLumaTh

AFheightbrightpointsystemstatisticalvalueThresholdSet

Value Range : [0, 4095]

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.11. ISP_AF_RAW_CFG_S

[Description]

AF Bayerdomainimagepreprocessingconfiguration

[Definition]

typedef struct _ISP_AF_RAW_CFG_S {
   CVI_U8 PreGammaEn;
   CVI_U8 PreGammaTable[AF_GAMMA_NUM];
} ISP_AF_RAW_CFG_S;

[Members]

Member Name

Description

PreGammaEn

AFmode blockGammaEnable, 0isnotEnable, 1isEnable

PreGammaTable[AF_GAMMA_NUM]

AFmoduleGamma tableSet

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.12. ISP_AF_PRE_FILTER_CFG_S

[Description]

AF Bayerdomainimagefilteringpreprocessingconfiguration

[Definition]

typedef struct _ISP_AF_PRE_FILTER_CFG_S {
   CVI_BOOL PreFltEn;
} ISP_AF_PRE_FILTER_CFG_S;

[Members]

Member Name

Description

PreFltEn

AFmodulefilteringpreprocessingEnable, 0isnotEnable, 1isEnable

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.13. ISP_AF_CROP_S

[Description]

AFsystemstatisticalvalueInputimagecropsettings

[Definition]

typedef struct _ISP_ AF _CROP_S {
   CVI_BOOL bEnable;
   CVI_U16 u16X;
   CVI_U16 u16Y;
   CVI_U16 u16W;
   CVI_U16 u16H;
} ISP_AF_CROP_S;

[Members]

Member Name

Description

bEnable

CropEnable, 0isnotEnable, willSetwhole imageimageoperationiscropsettings, 1isEnable

u16X

CropXstart position

Value Range: [8, imagewidth - 8]

u16Y

CropYstart position

Value Range: [2, imageheight - 2]

u16W

Cropwidth

Value Range: [16 * u16ZoneCol, imagewidth - 16]

u16H

Cropheight

Value Range: [16 * u16ZoneRow, imageheight - 4]

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.14. ISP_AF_H_PARAM_S

[Description]

Define AFhorizontalfilterparameternumberSet

[Definition]

typedef struct _ISP_AF_H_PARAM_S {
   CVI_S8 s8HFltHpCoeff[FIR_H_GAIN_NUM];
} ISP_AF_H_PARAM_S;

[Members]

Member Name

Description

s8HFltHpCoeff[FIR_H_GAIN_NUM]

AF horizontalfiltersystemnumber, useinControlFIRfilter frequencyresponse

Value Range : [-32, 31]

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.15. ISP_AF_V_PARAM_S

[Description]

Define AFverticalfilterparameternumberSet

[Definition]

typedef struct _ISP_AF_V_PARAM_S {
   CVI_S8 s8VFltHpCoeff[FIR_V_GAIN_NUM];
} ISP_AF_V_PARAM_S;

[Members]

Member Name

Description

s8VFltHpCoeff[FIR_V_GAIN_NUM]

AF verticalfiltersystemnumber, useinControlFIRfilter frequencyresponse

Value Range : [-32, 31]

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.16. ISP_STATISTICS_CFG_S

[Description]

ISP statistical information configuration

[Definition]

typedef struct _ISP_STATISTICS_CFG_S {
   ISP_STATISTICS_CTRL_U unKey;
   ISP_AE_STATISTICS_CFG_S stAECfg;
   ISP_WB_STATISTICS_CFG_S stWBCfg;
   ISP_FOCUS_STATISTICS_CFG_S stFocusCfg;
} ISP_STATISTICS_CFG_S;

[Members]

Member Name

Description

unKey

statistical informationEnable

stAECfg

AEstatistical information configuration

stWBCfg

WBstatistical information configuration

stFocusCfg

AFstatistical information configuration

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.17. ISP_FOCUS_ZONE_S

[Description]

Define AFstatisticalcalculate systemstatisticalresult

[Definition]

typedef struct _ISP_FOCUS_ZONE_S {
   CVI_U16 u16HlCnt;
   CVI_U64 u64h0;
   CVI_U64 u64h1;
   CVI_U32 u32v0;
} ISP_FOCUS_ZONE_S;

[Members]

Member Name

Description

u16HlCnt

AFpartregionintervalinsidesystemstatisticalexceedthroughheightbrightpointthreshold pointvalues, willSetwhole imageimageoperationiscropsettings, 1isEnable

u64h0

AFpartregionintervalinsidesystemstatisticalhorizontaldirectionfirstgroupFIRfilterresult

u64h1

AFpartregionintervalinsidesystemstatisticalhorizontaldirectionsecondgroupFIRfilterresult

u32v0

AFpartregionintervalinsidesystemstatisticalverticalhistogramtoFIRfilterresult

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.18. ISP_FE_FOCUS_STATISTICS_S

[Description]

Define AF FEprovide Statistical Information

[Definition]

typedef struct _ISP_FE_FOCUS_STATISTICS_S {
   ISP_FOCUS_ZONE_S  stZoneMetrics[AF_ZONE_ROW][AF_ZONE_COLUMN];
} ISP_FE_FOCUS_STATISTICS_S;

[Members]

Member Name

Description

stZoneMetrics

ISP AF blockstatistical information

[Precautions]

None.

[Related Data Types and Interfaces]

None.

36.3.19. ISP_AF_STATISTICS_S

[Description]

Define AFprovide allstatistical information

[Definition]

typedef struct _ISP_AF_STATISTICS_S {
   ISP_FE_FOCUS_STATISTICS_S stFEAFStat;
} ISP_AF_STATISTICS_S;

[Members]

Member Name

Description

stFEAFStat

AFinBayerdomain statistical information

[Precautions]

None.

[Related Data Types and Interfaces]

None.