4. AE

4.1. Overview

CVI AE moduleimplement functionis: according toautomaticmeasurelightsystemsystemobtainobtaincurrentimage exposureamount, againautomaticconfigurationlensaperture, sensor fastgateandgaintoobtainobtainmostoptimal imagequalityamount.

automaticexposure algorithmmainlypartaperturepriority, fastgatepriority, gainpriority.

apertureprioritywhenalgorithmwillpriorityAdjustaperturetocombineadapt position, againpartmatchexposure timeandgain, onlyadaptcombine p-irislens, thisformcanaveragebalancenoiseandscenedepth.

fastgateprioritywhenalgorithmwillprioritypartmatchexposure time, againpartmatch sensor gainand ISP gain, thisformcapture imagenoisewillratiorelativelysmall.

gainprioritythenisprioritypartmatch sensor gainand ISP gain, againpartmatchexposure time, adaptcombinecapturemotionobject scene.

current AE algorithmalsosupportcustomerusersettingsmoreflexible exposureallocation strategy, AEmodule workoperationflowsuch as Figure 4.1 as shown

_images/AE002.png

Figure 4.1 AE moduleworkoperationflowFigure

4.2. Key Concepts

  • exposure time: sensor accumulationaccumulateelectricalload wheninterval, is sensor pixel fromopenstartexposuretoelectricalamountisreadoutput thissegmentwheninterval.

  • exposuregain: for sensor outputelectricalload totalplacelargesystemnumber, Generallyhavedigital gainandanalog gain, analog gaininclude noisewillslightlysmall, theusingGenerallypriorityuseanalog gain.

  • aperture: apertureislensincanchangechangeinintervalaperturelargesmall mechanicalinstallset.

  • anti-flicker: byinelectricallamp electricalsourceworkfrequencyand sensor frameratenotmatchmatchandcause imageflicker, Generallythroughlimitexposure timeandmodify sensor frameratetoreachtoanti-flicker effect.

4.3. Functional Description

AE modulemainlyhave ISP AE statistical informationmoduleand AE Controlstrategy AE algorithm Firmware twopartconsists of. ISP AE statistical informationmodulemainlyisprovide sensor Inputnumberdata brightnessinformationsystemstatistical. itsprovide statistical informationincludehistogramFigureandaveragevalue, canat the same timeprovidewhole imageimage 256segment histogramFigureand R/Gr/Gb/B fourcomponentaveragevaluestatistical information, alsocanprovidewillwhole imageimagepartbecome MxN regionblock,eachregionblock R/Gr/Gb/B fourcomponentaveragevaluestatistical information, specificsuch as Figure 4.2 as shown

_images/AE003.png

Figure 4.2 AE 256-bin statistical information histogram

AE algorithm mainlyOperating Principleisthat iswhenGetInputimage statistical informationandandsettingstargetbrightnessperformratiorelatively, anddynamicAdjust sensor exposure timeandgainandlensaperturelargesmallusingreachtoactualbrightnessandsettingstargetbrightnessclose to. itsOperating Principlesuch as Figure 4.3 as shown.

_images/AE004.png

Figure 4.3 AE Operating PrincipleFigure

4.4. API Reference

4.4.1. AE library interface

all AE library interfaceallonlyisfor CVI AE library, ifcustomeruserownimplement AElibrary, notneed toconcernthissomeinterface, andcannotusethissomeinterface.

4.4.1.1. CVI_AE_Register

[Description]

to ISP Register AE library.

[Syntax]

CVI_S32 CVI_AE_Register(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAeLib

AE algorithm librarystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.1.2. CVI_AE_UnRegister

[Description]

to ISP unregister AE library.

[Syntax]

CVI_S32 CVI_AE_UnRegister(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAeLib

AE algorithm librarystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

  • theinterfacecall ISP libraryprovide AE unregistercallback interface, to implement AE to ISP libraryunregister function.

  • This interface does not support multiprocess operation.

None.

[Example]

None.

[Related Topics]

4.4.1.3. CVI_AE_SensorRegCallBack

[Description]

AE libraryprovide sensor Register callback interface.

[Syntax]

CVI_S32 CVI_AE_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, AE_SENSOR_REGISTER_S *pstRegister);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAeLib

AE algorithm librarystructure pointer

Input

pstSnsAttrInfo

to AE Register Sensor attribute

Input

pstRegister

Sensor Registerstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

  • SensorId is sensor libraryincustom value, mainlyuseincalibrateforto ISP Register sensor andto 3A Register sensor whetherissameone sensor.

  • AE through sensor Register onesystemcolumncallback interface, Getdifferencetransform Initializeparameternumber, andControlsensor.

  • This interface does not support multiprocess operation.

_images/AE005.png

Figure 4.4 AE libraryand sensor libraryinterval interface

[Example]

None.

[Related Topics]

4.4.1.4. CVI_AE_SensorUnRegCallBack

[Description]

AE libraryprovide sensor unregister callback interface.

[Syntax]

CVI_S32 CVI_AE_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, SENSOR_ID SensorId);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAeLib

AE algorithm librarystructure pointer

Input

SensorId

to AE unregister Sensor Id

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

  • SensorId is sensor libraryincustom value, mainlyuseincalibrateforto ISP Register sensor andto 3A Register sensor whetherissameone sensor.

  • This interface does not support multiprocess operation.

[Example]

None.

[Related Topics]

4.4.2. AE control module

exposureControlinterface:

4.4.2.1. CVI_ISP_SetExposureAttr

[Description]

settings AE exposure attributes.

[Syntax]

CVI_S32 CVI_ISP_SetExposureAttr(VI_PIPE ViPipe, const ISP_EXPOSURE_ATTR_S *pstExpAttr)

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstExpAttr

AE exposure attributesstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

  • AE exposureControltypeisautomaticwhen, exposure time, exposuregainallby AE algorithmautomaticControl, canthroughconfigurationautomaticexposure attributesstructure stAuto insurface parameternumberobtaintodifferent exposureeffect.

  • AE exposureControltypeismanualwhen, canthroughconfigurationmanualexposure attributesstructure stManual ControlEnabletype (exposure timeEnable, ISO num Enable, sensor analog gainEnable, sensor digital gainEnable, ISP digital gainEnable) andcorresponding exposureparameternumber (exposure time, ISO Num, sensor analog gain, sensor digital gain, ISPdigital gain) .

  • AE exposureControltypeisautomaticwhen, configurationmanualexposure attributes parameternumberinvalid. sameprinciple, AEexposureControltypeismanualwhen, configurationautomaticexposure attributes parameternumberinvalid.

  • AE exposureControltypeismanualwhen, ifexposureparameternumberSetexceedoutputmaximum (small) value, willuse sensor support maximum (small) valuereplace.

  • Nonetheoryisautomaticexposurealsoismanualexposure, exposure time in microseconds(us), exposuregain unitis10bit precision xnumber, that is 1024 replacetable 1 x, 2048 replacetable 2 xetc..

[Example]

// 自动曝光属性设置
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_AUTO;
stExpAttr.stAuto.stExpTimeRange.u32Max = 40000;
stExpAttr.stAuto.stExpTimeRange.u32Min = 10;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

stExpAttr.stAuto.u8Speed = 0x40;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

stExpAttr.stAuto.enAEStrategyMode = AE_EXP_HIGHLIGHT_PRIOR;
stExpAttr.stAuto.u16HistRatioSlope = 0x8;
stExpAttr.stAuto.u8MaxHistOffset = 0x10;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

stExpAttr.stAuto.stAntiflicker.bEnable = CVI_TRUE;
stExpAttr.stAuto.stAntiflicker.enFrequency = AE_FREQUENCE_50HZ;
stExpAttr.stAuto.stAntiflicker.enMode = ISP_ANTIFLICKER_NORMAL_MODE;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

stExpAttr.stAuto.stAEDelayAttr.u16BlackDelayFrame = 10;
stExpAttr.stAuto.stAEDelayAttr.u16WhiteDelayFrame = 0;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//手动曝光属性设置(使用 gain 控制):
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enExpTimeOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enAGainOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enDGainOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enISPDGainOpType = OP_TYPE_MANUAL;

stExpAttr.stManual.enGainType = AE_TYPE_GAIN;
stExpAttr.stManual.u32AGain = 0x400;
stExpAttr.stManual.u32DGain = 0x400;
stExpAttr.stManual.u32ISPDGain = 0x400;
stExpAttr.stManual.u32ExpTime= 0x40000;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//手动曝光属性设置(使用 ISO Num 控制):
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enExpTimeOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enISONumOpType= OP_TYPE_MANUAL;

stExpAttr.stManual.enGainType = AE_TYPE_ISO;
stExpAttr.stManual.u32ISONum = 1600;
stExpAttr.stManual.u32ExpTime= 0x40000;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//自动模式设定最大增益 32x(使用 gain 控制)
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_AUTO;
stExpAttr.stAuto.enGainType = AE_TYPE_GAIN;
stExpAttr.stAuto.stSysGainRange.u32Max = 32767;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//自动模式设定最大增益 32x(使用 ISO Num 控制)
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_AUTO;
stExpAttr.stAuto.enGainType = AE_TYPE_ISO;
stExpAttr.stAuto.stISONumRange.u32Max = 3200;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//快门模式(33333 us)设定最大增益 32x
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_AUTO;
stExpAttr.stAuto.stExpTimeRange.u32Min = 33333;
stExpAttr.stAuto.stExpTimeRange.u32Max = 33333;
stExpAttr.stAuto.enGainType = AE_TYPE_ISO;
stExpAttr.stAuto.stISONumRange.u32Max = 3200;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//手动模式设固定增益(32x, 使用 ISO Num)
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enGainType = AE_TYPE_ISO;
stExpAttr.stManual.enISONumOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.u32ISONum = 3200;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//手动模式设固定增益(32x, 使用 Gain)
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enGainType = AE_TYPE_ISO;
stExpAttr.stManual.enAGainOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enDGainOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.enISPDGainOpType = OP_TYPE_MANUAL;

stExpAttr.stManual.u32AGain = 0x8000;
stExpAttr.stManual.u32DGain = 0x400;
stExpAttr.stManual.u32ISPDGain = 0x400;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//自动快门
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//手动设定快门 (16384 us)
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.stManual.enExpTimeOpType = OP_TYPE_MANUAL;
stExpAttr.stManual.u32ExpTime = 16384;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//快门模式 (16384 us)
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bByPass = CVI_FALSE;
stExpAttr.enOpType = OP_TYPE_AUTO;
stExpAttr.stAuto.stExpTimeRange.u32Min = 16384;
stExpAttr.stAuto.stExpTimeRange.u32Max = 16384;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//设定 antiflicker 50Hz
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.stAuto.stAntiflicker.bEnable = 1;
stExpAttr.stAuto.stAntiflicker.enMode = ISP_ANTIFLICKER_NORMAL_MODE;
stExpAttr.stAuto.stAntiflicker.enFrequency = AE_FREQUENCE_50HZ;
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

//设定各 LV 的目标亮度
#define TABLE_SIZE  21
CVI_U8 target_max[TABLE_SIZE] = {15, 15, 15, 15,
  15, 15, 15, 20, 20, 25, 30, 35, 40, 40, 50, 50, 55, 60, 60,
  60, 60};
CVI_U8 target_min[TABLE_SIZE] = {40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 45,
  50, 50, 50, 50, 50, 50, 60, 60, 60};

CVI_U8 i;
VI_PIPE ViPipe = 0;
ISP_EXPOSURE_ATTR_S stExpAttr;
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);

for (i = 0; i < TABLE_SIZE;i++) {
  stExpAttr.stAuto.au8AdjustTargetMin[i] = target_min[i];
  stExpAttr.stAuto.au8AdjustTargetMax[i] = target_max[i];
}
CVI_ISP_SetExposureAttr(ViPipe, &stExpAttr);

[Related Topics]

4.4.2.2. CVI_ISP_GetExposureAttr

[Description]

Get AE exposure attributes.

[Syntax]

CVI_S32 CVI_ISP_GetExposureAttr(VI_PIPE ViPipe, ISP_EXPOSURE_ATTR_S *pstExpAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstExpAttr

AE exposure attributesstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.3. CVI_ISP_SetWDRExposureAttr

[Description]

Set WDR modeunder AE exposure attributes.

[Syntax]

CVI_S32 CVI_ISP_SetWDRExposureAttr(VI_PIPE ViPipe, const ISP_WDR_EXPOSURE_ATTR_S *pstWDRExpAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstWDRExpAttr

WDR modeunder AE exposure attributesstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

//手动设定曝光比 8x
VI_PIPE ViPipe = 0;

ISP_WDR_EXPOSURE_ATTR_S stWdrExpAttr;
CVI_ISP_GetWDRExposureAttr(ViPipe, &stWdrExpAttr);
stWdrExpAttr.enExpRatioType = OP_TYPE_MANUAL;
stWdrExpAttr.au32ExpRatio[0] = 512;
CVI_ISP_SetWDRExposureAttr(ViPipe, &stWdrExpAttr);

//设定自动模式曝光比限制在 8x ~ 16x
ISP_WDR_EXPOSURE_ATTR_S stWdrExpAttr;
CVI_ISP_GetWDRExposureAttr(ViPipe, &stWdrExpAttr);
stWdrExpAttr.enExpRatioType = OP_TYPE_AUTO;
stWdrExpAttr.u32ExpRatioMin = 512;
stWdrExpAttr.u32ExpRatioMax = 1024;
CVI_ISP_SetWDRExposureAttr(ViPipe, &stWdrExpAttr);

//设定长/短帧各 LV 的目标亮度
#define TABLE_SIZE  21
CVI_U8 LeTarget[TABLE_SIZE] = {15, 15, 15, 15,
  15, 15, 15, 20, 20, 25, 30, 35, 40, 40, 50, 50, 55, 60, 60,
  60, 60};

CVI_U8 SeTarget[TABLE_SIZE] = {5, 5, 5, 5,
  5, 5, 5, 10, 10, 15, 15, 15, 15, 20, 20, 20, 20, 20, 20,
  20, 20};

CVI_U8 i;
ISP_WDR_EXPOSURE_ATTR_S stWdrExpAttr;
CVI_ISP_GetWDRExposureAttr(ViPipe, &stWdrExpAttr);

for (i = 0; i < TABLE_SIZE;i++) {
  stWdrExpAttr.au8LEAdjustTargetMin[i] =
  stWdrExpAttr.au8LEAdjustTargetMax[i] = LeTarget[i];

  stWdrExpAttr.au8SEAdjustTargetMin[i] =
  stWdrExpAttr.au8SEAdjustTargetMax[i] = SeTarget[i];

}
CVI_ISP_SetWDRExposureAttr(ViPipe, &stWdrExpAttr);

[Related Topics]

4.4.2.4. CVI_ISP_GetWDRExposureAttr

[Description]

Get WDR modeunder AE exposure attributes.

[Syntax]

CVI_S32 CVI_ISP_GetWDRExposureAttr(VI_PIPE ViPipe, ISP_WDR_EXPOSURE_ATTR_S *pstWDRExpAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstWDRExpAttr

WDR modeunder AE exposure attributesstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.5. CVI_ISP_SetAERouteAttr

[Description]

Set AE exposureallocation strategy.

[Syntax]

CVI_S32 CVI_ISP_SetAERouteAttr(VI_PIPE ViPipe, const ISP_AE_ROUTE_S *pstAERouteAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteAttr

AE exposureallocation strategystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

thisinterfaceuseinsettingsAEexposureallocation route, AEcalculateobtainto exposureamountwillaccording tosettings routeperformpartmatch, usercanaccording toown Requirementssettingsexposurepriority, gainpriority, aperturepriority.

AEallocation routefollowusingunderrulethen:

  • maximumsupport16node, eachnodehaveexposure time, gain, aperturethreecomponent, gaincontainanalog gain, digital gain, ISPdigital gain.

  • nodeinexposure time unitisus, notcanSetis0, alsonotcanSettoosmallcauseactualcorresponding exposurelinenumberis0, whetherthencancanproduceabnormaloften.

  • aperturecomponentonly supportsP-Iris, not supportedDC-Iris, becauseisDC-IriscannotpreciseControl, theusingDC-Irisandmanualaperturelensaperturecomponentisinvalid . that isaperturetypeisDC-Iriswhen, nodeaperturecomponentnotwillforexposureamountpartmatchproduceanyaffects.

  • node exposureamountisexposure time, gainandaperture product, nodeexposureamountneedissingleadjustpassincrease, afteronenode exposureamountshouldlargeinoretc.inbeforeonenode exposureamount, firstnode exposureamountminimum, mostafteronenode exposureamountmaximum.

  • ifrelativeadjacentnode exposureamountincrease, thenshouldthehaveonecomponentincrease, othercomponentfixed, increase componentdeterminesthesegmentroute allocation strategy. For exampleexposure timecomponentincrease, thenthesegmentroute allocation strategyisexposure timepriority.

  • not supportedSetetc.exposureamountnode.

usercanaccording todifferent sceneSetdifferent route, allocation routesupportdynamicswitch.

  • forDC-Irisandmanualaperturelens, DefaultAEallocation strategyisfirstfirstpartmatchexposure time, itstimepartmatchgain. forP-Irislens, DefaultAEallocation strategyisfirstfirstAdjustaperture, willapertureadjusttomaximumafterAdjustexposure time, mostafteragainpartmatchgain. ifcurrentexposureamountnotinusersettings routerangewhenin, according toDefaultstrategypartmatch.

  • inlineperformDC-IrisandP-Irisswitch, AE routewillagainsetisandaperturetyperelativematchmatch Defaultallocation strategy, usercanaccording toneed toinswitchaperturetypewhenselflineSetAE route.

  • automaticdecreaseframewhen, maximumexposure time changechangewillmorenewtoallocation routein.

  • framerateswitchwhen, ifuserSet maximumexposuretargetwhenintervallargeinswitchafter1frametheallow maximumexposure time, thenallocation route maximumexposure timewillmorenewisswitchafter1frametheallow maximumexposure time.

  • sendgenerateautomaticdecreaseframe, linearandWDRmodeswitch, framerateswitch, limitexposure timeorgain maximumminimumvalueetc.casewhen, actualtakes effect AE routecancanandMPISet notconsistent, thiswhencanthroughCVI_ISP_QueryExposureInfoGetactualtakes effect AE route.

[Example]

//设定 gain 128x的 route
VI_PIPE ViPipe = 0;

ISP_AE_ROUTE_S  stRoute;
CVI_ISP_SetAERouteAttr(ViPipe, &stRoute);

stRoute.u32TotalNum = 3;

stRoute.astRouteNode[0].u32IntTime = 30;
stRoute.astRouteNode[0].u32SysGain= 1024;
stRoute.astRouteNode[0].enIrisFNO = 10;
stRoute.astRouteNode[0].u32IrisFNOLin = 1024;

stRoute.astRouteNode[1].u32IntTime = 33333;
stRoute.astRouteNode[1].u32SysGain = 1024;
stRoute.astRouteNode[1].enIrisFNO = 10;
stRoute.astRouteNode[1].u32IrisFNOLin = 1024;

stRoute.astRouteNode[2].u32IntTime = 33333;
stRoute.astRouteNode[2].u32SysGain = 131072;
stRoute.astRouteNode[2].enIrisFNO = 10;
stRoute.astRouteNode[2].u32IrisFNOLin = 1024;

CVI_ISP_SetAERouteAttr(ViPipe, &stRoute);

[Related Topics]

4.4.2.6. CVI_ISP_GetAERouteAttr

[Description]

Get AE exposureallocation strategy.

[Syntax]

CVI_S32 CVI_ISP_GetAERouteAttr(VI_PIPE ViPipe, ISP_AE_ROUTE_S *pstAERouteAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteAttr

AE exposureallocation strategystructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.7. CVI_ISP_SetAERouteAttrEx

[Description]

SetAEexposurepartmatchextensionattribute, supportrespectivelySetAEallocation strategyin sensoranalog gain, sensordigital gainandISPdigital gain.

[Syntax]

CVI_S32 CVI_ISP_SetAERouteAttrEx(VI_PIPE ViPipe, const ISP_AE_ROUTE_EX_S *pstAERouteAttrEx);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteAttrEx

AE exposureallocation strategy extension attributesstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

  • thisinterfaceuseinsettingsAEexposurepartmatchextensionattribute, AEcalculateobtainto exposureamountwillaccording tosettings routeperformpartmatch, usercanaccording toown Requirementssettingsexposure timepriority, sensoranalog gainpriority, sensordigital gainpriority, ISPdigital gainpriorityandaperturepriority. theinterfacecanuseinSetWDRmodeunder exposureallocation route, reducelightnormalindoorinsideilluminancemultipleframesynthesisWDRproduce workfrequencyflickercurrentimage, excellenttransformWDRmodeimageeffect.

  • AEexposurepartmatchextensionattributewhethertakes effectcanthroughconfigurationCVI_ISP_SetExposureAttrinterfacein bAERouteExValidtoimplement. bAERouteExValidisCVI_TRUEwhenuseextensionAE route, whetherthenusenormalAE route.

  • otherPrecautionsand CVI_ISP_SetAERouteAttr rulethenrelativesame

[Example]

None.

[Related Topics]

4.4.2.8. CVI_ISP_GetAERouteAttrEx

[Description]

GetAEexposureallocation strategy extension attributes.

[Syntax]

CVI_S32 CVI_ISP_GetAERouteAttrEx(VI_PIPE ViPipe, ISP_AE_ROUTE_EX_S *pstAERouteAttrEx);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteAttrEx

AEexposureallocation strategy extension attributesstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

VI_PIPE ViPipe = 0;

ISP_EXPOSURE_ATTR_S stExpAttr;
ISP_AE_ROUTE_EX_S stRouteEx;
CVI_U32 au32RouteExNode[6][5]
= {{   30,  1024,  1024, 1024, 0},
{   30,  1024,  1024, 1024, 10},
{   30, 16384,  1024, 1024, 10},
{400000, 16384,  1024, 1024, 10},
{400000, 16384, 4096, 1024, 10},
{400000, 16384, 4096, 4096, 10}};
CVI_ISP_GetAERouteAttrEx(ViPipe, &stRouteEx);
CVI_ISP_GetExposureAttr(ViPipe, &stExpAttr);
stExpAttr.bAERouteExValid = CVI_TRUE;
stRouteEx.u32TotalNum = 6;
memcpy(stRouteEx.astRouteExNode, au32RouteExNode, sizeof(au32RouteExNode));

[Related Topics]

4.4.2.9. CVI_ISP_QueryExposureInfo

[Description]

Get AE internalstatusinformation, include256 segmenthistogramFigureandaveragebrightnessetc.statistical information, at the same timealsocanGet AE Runstatusin exposure time, gain, exposureamount, whenframe brightness, currently environmentbrightnessandactualtakes effect AE routeetc.information.

[Syntax]

CVI_S32 CVI_ISP_QueryExposureInfo(VI_PIPE ViPipe, ISP_EXP_INFO_S *pstExpInfo);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstExpInfo

exposureinternalstatusinformationstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

Get exposure timeusingmicroseconds(us)as the unit, Get sensoranalog gain, sensordigital gainandISPdigital gainusingxnumberas the unit, precisionis10bit.

[Example]

// get sensor again, sensor dgain, isp dgain and exposure ratio
VI_PIPE ViPipe = 0;
ISP_EXP_INFO_S stExpInfo;

CVI_ISP_QueryExposureInfo(ViPipe, &stExpInfo);

printf("sensor used time = %d\n", stExpInfo. u32ExpTime);
printf("sensor used again = %d\n", stExpInfo. u32AGain);
printf("sensor used dgain = %d\n", stExpInfo. u32DGain);
printf("isp used dgain = %d\n", stExpInfo. u32ISPDGain);
printf("WDR Exposure ratio = %d\n", stExpInfo. u32WDRExpRatio);
printf("Light Value = %f\n", stExpInfo. fLightValue);

[Related Topics]

None.

4.4.2.10. CVI_ISP_SetAntiFlicker

[Description]

Set AE anti flicker function.

[Syntax]

CVI_S32 CVI_ISP_SetAntiFlicker(VI_PIPE ViPipe, CVI_BOOL enable, CVI_U8 frequency);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

enable

AE anti flicker Enable

Input

frequency

anti-flickerfrequency

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

//设定 AE anti flicker 50Hz
VI_PIPE ViPipe = 0;
CVI_U8 enable, frequency;
enable = 1;
frequency = 50;

CVI_ISP_SetAntiFlicker(ViPipe, enable, frequency);

[Related Topics]

4.4.2.11. CVI_ISP_GetAntiFlicker

[Description]

Get AE anti flicker settings.

[Syntax]

CVI_S32 CVI_ISP_GetAntiFlicker(VI_PIPE ViPipe, CVI_BOOL *pEnable, CVI_U8 *pFrequency);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pEnable

AE anti flicker Enablepointer

Input

pFrequency

anti-flickerfrequencypointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

None.

4.4.2.12. CVI_ISP_QueryFps

[Description]

Get AE currentfps.

[Syntax]

CVI_S32 CVI_ISP_QueryFps(VI_PIPE ViPipe, CVI_FLOAT *pFps);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pFps

AE fpspointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.13. CVI_ISP_GetCurrentLvX100

[Description]

useinGetcurrent AE measurelightresult, that isenvironmentlightbrightnessvalue LV. canuseindetermineblacknightandwhiteday, reachtotypesimilarlightsensitiveelectricalblock effect.

[Syntax]

CVI_S32 CVI_ISP_GetCurrentLvX100(VI_PIPE ViPipe, CVI_S16 *ps16Lv);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

ps16Lv

Returncurrent LV value

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

#include "cvi_ae.h"

#define ENTER_NIGHT_LV_LEVEL 0
#define ENTER_DAY_LV_LEVEL   700
#define CHECK_COUNT          5

bool checkDayOrNight(void)
{
    static bool dayOrNight = true;
    static CVI_U8 checkDayCount = 0;
    static CVI_U8 checkNightCount = 0;
    CVI_S16 lv = 0;

    CVI_ISP_GetCurrentLvX100(0, &lv);
    if (lv > ENTER_DAY_LV_LEVEL) {
      if (checkDayCount < CHECK_COUNT) {
            checkDayCount++;
      } else {
            dayOrNight = true;
      }
      checkNightCount = 0;
    } else if (lv < ENTER_NIGHT_LV_LEVEL) {
        if (checkNightCount < CHECK_COUNT) {
              checkNightCount++;
        } else {
              dayOrNight = false;
        }
        checkDayCount = 0;
    } else {
        checkDayCount = 0;
        checkNightCount = 0;
    }
    return dayOrNight;
}
int main(void)
{
    while (1) {
      sleep(1);
      printf("checkDayOrNight: %s\n", checkDayOrNight() ? "day" : "night");
    }
    return 0;
}

[Related Topics]

None.

4.4.2.14. CVI_ISP_SetSmartExposureAttr

[Description]

Setintelligentmodeunder AE exposure attributes. onlyinhaveintelligentinformationwhentakes effect.

[Syntax]

CVI_S32 CVI_ISP_SetSmartExposureAttr(VI_PIPE ViPipe, const ISP_SMART_EXPOSURE_ATTR_S *pstSmartExpAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstSmartExpAttr

intelligentmodeunder AE exposure attributesstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

#include "cvi_ae.h"

VI_PIPE ViPipe = 0;
ISP_SMART_EXPOSURE_ATTR_S   stSmartExpAttr;

CVI_ISP_GetSmartExposureAttr(ViPipe, &stSmartExpAttr);

stSmartExpAttr.bEnable = 1;
stSmartExpAttr.u8LumaTarget = 56;
stSmartExpAttr.u16ExpCoef= 1024;
stSmartExpAttr.u16ExpCoefMax= 4096;
stSmartExpAttr.u16ExpCoefMin = 256;
stSmartExpAttr.u8SmartInterval = 1;
stSmartExpAttr.u8SmartSpeed = 32;
stSmartExpAttr.u16SmartDelayNum = 5;
stSmartExpAttr.u8Weight = 80;
stSmartExpAttr.u8NarrowRatio = 75;

CVI_ISP_SetSmartExposureAttr(ViPipe, &stSmartExpAttr);

[Related Topics]

None.

4.4.2.15. CVI_ISP_GetSmartExposureAttr

[Description]

Getintelligentmodeunder AE exposure attributes. onlyinhaveintelligentinformationwhentakes effect.

[Syntax]

CVI_S32 CVI_ISP_GetSmartExposureAttr(VI_PIPE ViPipe, ISP_SMART_EXPOSURE_ATTR_S *pstSmartExpAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstSmartExpAttr

intelligentmodeunder AE exposure attributesstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.16. CVI_ISP_SetAERouteSFAttr

[Description]

Set AE WDR short exposureexposureallocation strategy.

[Syntax]

CVI_S32 CVI_ISP_SetAERouteSFAttr(VI_PIPE ViPipe, const ISP_AE_ROUTE_S *pstAERouteSFAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteSFAttr

AE WDR short exposureexposureallocation strategystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.17. CVI_ISP_GetAERouteSFAttr

[Description]

Get AE WDR short exposureexposureallocation strategy.

[Syntax]

CVI_S32 CVI_ISP_GetAERouteSFAttr(VI_PIPE ViPipe, ISP_AE_ROUTE_S *pstAERouteSFAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteSFAttr

AE WDR short exposureexposureallocation strategystructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.18. CVI_ISP_SetAERouteSFAttrEx

[Description]

SetAE WDRshort exposureexposurepartmatchextensionattribute, supportrespectivelySetAEallocation strategyin sensoranalog gain, sensordigital gainandISPdigital gain.

[Syntax]

CVI_S32 CVI_ISP_SetAERouteSFAttrEx(VI_PIPE ViPipe, const ISP_AE_ROUTE_EX_S *pstAERouteSFAttrEx);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteSFAttrEx

AE WDRshort exposureexposureallocation strategy extension attributesstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.2.19. CVI_ISP_GetAERouteSFAttrEx

[Description]

GetAE WDRshort exposure exposureallocation strategy extension attributes.

[Syntax]

CVI_S32 CVI_ISP_GetAERouteSFAttrEx(VI_PIPE ViPipe, ISP_AE_ROUTE_EX_S *pstAERouteSFAttrEx);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAERouteSFAttrEx

AE WDRshort exposureexposureallocation strategy extension attributesstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

4.4.3. AI control module

4.4.3.1. CVI_ISP_SetIrisAttr

[Description]

settingsaperture Controlattribute, thefunctioncanimplementmanualapertureattributeandaperturetypeetc.parameternumber Set.

[Syntax]

CVI_S32 CVI_ISP_SetIrisAttr(VI_PIPE ViPipe, const ISP_IRIS_ATTR_S *pstIrisAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIrisAttr

apertureControlattributestructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

  • according toactualforconnectlensaperturetype, Setcorrect aperturetypeattribute, bythisagainremoveSetrelated DC-Iris/P-IrisControlattribute. ifforconnect ismanualaperturelens, canwillaperturetypeSetisISP_IRIS_DC_TYPE, recommendedthiswhenDisableAIEnable.

  • manualapertureattributemainlyuseinDebug, canthroughtheMPIperformSet. forP-Irislens, manualenIrisFNO valuewillbe affected bytomaximum, minimumaperturetargetvalue affects. automaticapertureattribute moremultipleparameternumberneed tocall CVI_ISP_SetDcirisAttr and CVI_ISP_SetPirisAttr performSet.

[Example]

None.

[Related Topics]

4.4.3.2. CVI_ISP_GetIrisAttr

[Description]

Getaperture Controlattribute.

[Syntax]

CVI_S32 CVI_ISP_GetIrisAttr(VI_PIPE ViPipe, ISP_IRIS_ATTR_S *pstIrisAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIrisAttr

apertureControlattributestructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

None.

4.4.3.3. CVI_ISP_SetDcirisAttr

[Description]

settingsDC-Iris AIalgorithm Controlattribute, thefunctioncanimplementDC-Irisautomaticaperture parameternumberSet.

[Syntax]

CVI_S32 CVI_ISP_SetDcirisAttr(VI_PIPE ViPipe, const ISP_DCIRIS_ATTR_S *pstDcirisAttr);;

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIrisAttr

DC-IrisautomaticapertureControlattributestructure pointer

Input/Output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

DC-IrisapertureControlcaptureusePIDalgorithm, algorithmaccording toimagebrightness, AdjustPWMduty cycleratioforaperturelargesmallperformControl. whenexposure timeandgainreachtominimumtargetvalueofafter, willenterapertureControlregion. whenapertureControlcanfullsufficienttargetbrightness requirewhen, AE directReturn, keepexposure timeandgainnotchange. whenimagebrightnessstableandPWMduty cycleratiomaintaininopenopenvalueonesegmentwhenintervalafter, AIalgorithmwillconsiderisaperturealreadythroughopenopentomaximum, exitapertureControlregion, willControlweightexchangealsogiveAE

[Example]

None.

[Related Topics]

4.4.3.4. CVI_ISP_GetDcirisAttr

[Description]

GetDC-Irisautomaticaperture Controlattribute.

[Syntax]

CVI_S32 CVI_ISP_GetDcirisAttr(VI_PIPE ViPipe, ISP_DCIRIS_ATTR_S *pstDcirisAttr);;

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIrisAttr

DC-IrisautomaticapertureControlattributestructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

None.

[Example]

None.

[Related Topics]

None.

4.4.3.5. CVI_ISP_SetPirisAttr

[Description]

settingsP-Irisautomaticaperture Controlattribute

[Syntax]

CVI_S32 CVI_ISP_SetPirisAttr(VI_PIPE ViPipe, const ISP_PIRIS_ATTR_S *pstPirisAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstPirisAttr

P-IrisautomaticapertureControlattributestructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

currentlystillnot yetsupport P-iris

[Example]

None.

[Related Topics]

4.4.3.6. CVI_ISP_GetPirisAttr

[Description]

GetP-Irisautomaticaperture Controlattribute.

[Syntax]

CVI_S32 CVI_ISP_GetPirisAttr(VI_PIPE ViPipe, ISP_PIRIS_ATTR_S *pstPirisAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIrisAttr

P-IrisautomaticapertureControlattributestructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code .

[Requirements]

  • Header File: cvi_ae.h

  • Library File: libae.a

[Note]

currentlystillnot yetsupport P-iris

[Example]

None.

[Related Topics]

4.5. Data Types

4.5.1. Register

4.5.1.1. AE_SENSOR_REGISTER_S

[Description]

Define sensorRegisterstructure.

[Definition]

typedef struct _AE_SENSOR_REGISTER_S
{
  AE_SENSOR_EXP_FUNC_S stAeExp;
} AE_SENSOR_REGISTER_S;

[Members]

Member Name

Description

stAeExp

SensorRegister callback functionstructure

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.1.2. AE_SENSOR_EXP_FUNC_S

[Description]

Define sensorcallback functionstructure.

[Definition]

typedef struct _AE_SENSOR_EXP_FUNC_S
{
  CVI_S32(*pfn_cmos_get_ae_default)(VI_PIPE ViPipe, AE_SENSOR_DEFAULT_S *pstAeSnsDft);
  CVI_VOID(*pfn_cmos_fps_set)(VI_PIPE ViPipe, CVI_FLOAT f32Fps,
  AE_SENSOR_DEFAULT_S *pstAeSnsDft);
  CVI_VOID(*pfn_cmos_slow_framerate_set)(VI_PIPE ViPipe, CVI_U32 u32FullLines, AE_SENSOR_DEFAULT_S *pstAeSnsDft);
  CVI_VOID(*pfn_cmos_inttime_update)(VI_PIPE ViPipe, CVI_U32 *u32IntTime);
  CVI_VOID(*pfn_cmos_gains_update)(VI_PIPE ViPipe, CVI_U32 *u32Again, CVI_U32 *u32Dgain);
  CVI_VOID (*pfn_cmos_again_calc_table)(VI_PIPE ViPipe, CVI_U32 *pu32AgainLin, CVI_U32 *pu32AgainDb);
  CVI_VOID (*pfn_cmos_dgain_calc_table)(VI_PIPE ViPipe, CVI_U32 *pu32DgainLin, CVI_U32 *pu32DgainDb);
  CVI_VOID (*pfn_cmos_get_inttime_max)(VI_PIPE ViPipe, CVI_U16 u16ManRatioEnable, CVI_U32 *au32Ratio, CVI_U32 *au32IntTimeMax, CVI_U32 *au32IntTimeMin, CVI_U32 *pu32LFMaxIntTime);
  CVI_VOID(*pfn_cmos_ae_fswdr_attr_set)(VI_PIPE ViPipe, AE_FSWDR_ATTR_S *pstAeFSWDRAttr);
} AE_SENSOR_EXP_FUNC_S;

[Members]

Member Name

Description

pfn_cmos_get_ae_default

GetAEalgorithm libraryinitialvalue callback function pointer.

pfn_cmos_fps_set

Setsensor framerate.

pfn_cmos_slow_framerate_set

Setsensor decreaseframe.

pfn_cmos_inttime_update

Setsensor exposure time.

pfn_cmos_gains_update

Setsensor analog gainanddigital gain.

pfn_cmos_again_calc_table

calculateTABLEtypesensoranalog gain.

pfn_cmos_dgain_calc_table

calculateTABLEtypesensordigital gain.

pfn_cmos_get_inttime_max

WDRmodeunder, calculateshort framemaximum exposure time callback function pointer, andsensorstrongrelated.

pfn_cmos_ae_fswdr_attr_set

2to1LineWDRmodeunder, Setlong-frame mode

[Precautions]

  • ifcallback function pointernotneed toassignvalue, need tosetisNULL.

  • pfn_cmos_inttime_updateandpfn_cmos_gains_update inSet exposure timeandgainsuch aswhatconversionbecomesensor configurationvalueandsensorstrongrelated, pleaseparameterreadsensormanual.

[Related Data Types and Interfaces]

4.5.1.3. AE_SENSOR_DEFAULT_S

[Description]

Define AEalgorithm library Initializeparameternumberstructure.

[Definition]

typedef struct _AE_SENSOR_DEFAULT_S
{
  CVI_U8 au8HistThresh[HIST_THRESH_NUM];
  CVI_U8 u8AeCompensation;
  CVI_U32 u32LinesPer500ms;
  CVI_U32 u32FlickerFreq;
  CVI_U32 u32HmaxTimes;
  CVI_U32 u32InitExposure;
  CVI_U32 u32InitAESpeed;
  CVI_U32 u32InitAETolerance;
  CVI_U32 u32FullLinesStd;
  CVI_U32 u32FullLinesMax;
  CVI_U32 u32FullLines;
  CVI_U32 u32MaxIntTime;
  CVI_U32 u32MinIntTime;
  CVI_U32 u32MaxIntTimeTarget;
  CVI_U32 u32MinIntTimeTarget;
  AE_ACCURACY_S stIntTimeAccu;
  CVI_U32 u32MaxAgain;
  CVI_U32 u32MinAgain;
  CVI_U32 u32MaxAgainTarget;
  CVI_U32 u32MinAgainTarget;
  AE_ACCURACY_S stAgainAccu;
  CVI_U32 u32MaxDgain;
  CVI_U32 u32MinDgain;
  CVI_U32 u32MaxDgainTarget;
  CVI_U32 u32MinDgainTarget;
  AE_ACCURACY_S stDgainAccu;
  CVI_U32 u32MaxISPDgainTarget;
  CVI_U32 u32MinISPDgainTarget;
  CVI_U32 u32ISPDgainShift;
  CVI_U32 u32MaxIntTimeStep;
  CVI_U32 u32LFMaxShortTime;
  CVI_U32 u32LFMinExposure;
  ISP_AE_STRATEGY_E enAeExpMode;
  CVI_U16 u16ISOCalCoef;
  CVI_U8 u8AERunInterval;
  CVI_FLOAT f32Fps;
  CVI_FLOAT f32MinFps;
  CVI_U32 denom;
  CVI_U32 u32AEResponseFrame;
  CVI_U32 u32SnsResponseFrame;
  CVI_U32 u32SnsStableFrame;
  AE_BLC_TYPE_E enBlcType;
  ISP_SNS_GAIN_MODE_E  enWDRGainMode;
} AE_SENSOR_DEFAULT_S;

[Members]

Member Name

Description

u8AeCompensation

AEbrightnesstargetvalue, The value range is[0,255], recommendeduse0x38~0x40.

u32LinesPer500ms

each500ms totallinenumber.

u32FlickerFreq

anti-flickerfrequency, valuesiscurrentelectricalsourcefrequency 256x.

u32HmaxTimes

Sensorreadoutputoneline wheninterval, unit: ns.

u32InitExposure

Defaultinitial exposureamount, etc.inexposure time(linenumber)*systemsystemgain(6bitfractional precision). AEalgorithmcaptureusethevalueoperationisinitial5frame exposureamount

u32InitAESpeed

Default initialAEAdjustspeed, AEalgorithmcaptureusethevalueoperationisinitial100frame Adjustspeed

u32InitAETolerance

DefaultinitialAEexposuretolerancebiasdifference, AEcalculate methodcaptureusethevalueoperationisinitial100frame exposuretolerancebiasdifferencevalue, canuseinSetobtaintofirsttimeAEconvergencestableflag brightnessrange

u32FullLinesStd

baselineframeratewhen1frame validlinenumber.

u32FullLinesMax

sensordecreaseframeafter1framethecanreachto maximumlinenumber, Generallysetissensorthesupport maximumlinenumber.

u32FullLines

sensoreachframeactualtakes effect totallinenumber. useCVI AEalgorithmwhen, callbackcmos_fps_setandcmos_slow_framerate_setwhenmustgivethevalueassignvalue, useinReturneachframeactualtakes effect totallinenumber.

u32MaxIntTime

maximumexposure time, usinglineas the unit.

u32MinIntTime

minimumexposure time, usinglineas the unit.

u32MaxIntTimeTarget

maximumexposure timetargetvalue, usinglineas the unit.

u32MinIntTimeTarget

minimumexposure timetargetvalue, usinglineas the unit.

stIntTimeAccu

exposure timeprecision.

u32MaxAgain

maximumanalog gain, usingxas the unit.

u32MinAgain

minimumanalog gain, usingxas the unit.

u32MaxAgainTarget

maximumanalog gaintargetvalue, usingxas the unit.

u32MinAgainTarget

minimumanalog gaintargetvalue, usingxas the unit.

stAgainAccu

analog gainprecision.

u32MaxDgain

maximumdigital gain, usingxas the unit.

u32MinDgain

minimumdigital gain, usingxas the unit.

u32MaxDgainTarget

maximumdigital gaintargetvalue, usingxas the unit.

u32MinDgainTarget

minimumdigital gaintargetvalue, usingxas the unit.

stDgainAccu

digital gainprecision.

u32MaxISPDgainTarget

maximumISPdigital gaintargetvalue, usingxas the unit.

u32MinISPDgainTarget

minimumISPdigital gaintargetvalue, usingxas the unit.

u32ISPDgainShift

ISPdigital gainprecision.

u32MaxIntTimeStep

short frameexposure timereducesmall maximumAdjuststep size, usinglinenumberas the unit. onlyintwoframesynthesismodeundervalid.

u32LFMaxShortTime

automatic long-frame modeundershort framemaximumexposure time.

u32LFMinExposure

automatic long-frame modeunderstrongcontroloutputlong frame minimumexposureamount

enAeExpMode

Defaultexposurestrategy, heightlightpriorityorlowlightpriority. recommended FSWDRmodeSetislowlightpriority, linearmodeandBuiltInWDRSet isheightlightpriority. ifnotSetthevalue, Defaultisheightlightpriority.

u16ISOCalCoef

ISOcalibrationsystemnumber, useinguaranteecapturetheneedDCFinformationindisplay ISOisstandard , 8bitprecision.

Value Range: [0x0, 0xFFFF],

Default Value: is0x100.

u8AERunInterval

DefaultAEalgorithmRunintervalinterval, using frameas the unit. ifnotSet, thenDefaultAEeachframeexecutelineonetime.

Value Range: (0x0, 0xFF]

f32Fps

baselineframerate

u32AEResponseFrame

Sensor exposure time/gainsynchronoustakes effect theneed framenumber

u32SnsResponseFrame

Sensorreverseshouldframenumber

[Precautions]

  • linear/WDRmodeswitchwhen, willcallbackpfn_cmos_get_ae_defaultfunctionmorenewAErelatedDefaultparameternumber. ifWDRmodeneeduseAEextensionallocation routeandlinearmodenotneed to, recommendedincmos_get_ae_defaultfunctioninsurfacefirstforAErouteclear to zero: bAERouteExValid = CVI_FALSE, stAERouteAttr.u32TotalNum= 0, stAERouteAttrEx.u32TotalNum = 0, thenaftervisualneed toinWDRpartsupportassignvalue.

  • u32LFMaxShortTimeisautomatic long-frame modeundershort frameexposure timemaximum value, ifthisparameternumberSetthroughsmallwillcauseautomatic long-frame modeunderbright regionnoisetablecurrentchangedifference.

[Related Data Types and Interfaces]

  • ISP_SENSOR_EXP_FUNC_S

4.5.1.4. AE_ACCURACY_E

[Description]

Define exposure time, gain precisiontype enumeration.

[Definition]

typedef enum _AE_ACCURACY_E
{
  AE_ACCURACY_DB = 0,
  AE_ACCURACY_LINEAR,
  AE_ACCURACY_TABLE,
  AE_ACCURACY_BUTT,
} AE_ACCURACY_E;

[Members]

Member Name

Description

AE_ACCURACY_DB DB

precisiontype.

AE_ACCURACY_LINEAR

linearprecisiontype.

AE_ACCURACY_TABLE

tablegridtype.

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.1.5. AE_ACCURACY_S

[Description]

Define exposure time, gain precision structure

[Definition]

typedef struct _AE_ACCURACY_S
{
  AE_ACCURACY_E enAccuType;
  float f32Accuracy;
  float f32Offset;
} AE_ACCURACY_S;

[Members]

Member Name

Description

enAccuType

precisiontype, includelineartype, DBtypeandTABLEtype. .

f32Accuracy

precisionvalue.

f32Offset

exposure time biasmoveamount, supportpositivenegativebiasmoveamountSet, usinglineas the unit, thevalueconfigurationandsensorstrongrelated.

[Precautions]

None.

[Related Data Types and Interfaces]

None.

4.5.2. AE

4.5.2.1. ISP_AE_MODE_E

[Description]

Automatic Definitionexposure mode.

[Definition]

typedef enum _ISP_AE_MODE_E
{
  AE_MODE_SLOW_SHUTTER = 0,
  AE_MODE_FIX_FRAME_RATE  = 1,
  AE_MODE_BUTT
} ISP_AE_MODE_E;

[Members]

Member Name

Description

AE_MODE_SLOW_SHUTTER

automaticdecreaseframemode, that isSLOW_SHUTTERmode.

AE_MODE_FIX_FRAME_RATE

fixedframeratemode.

[Precautions]

  • automaticdecreaseframemodeisindicateautomaticexposureAdjustwhenwillpriorityincreaselargeexposure timetofullyamountreducesmallgain. whensensorgainreachtouserSetmaximum valuewhen, automaticexposureAdjustwillgraduallydecreaseframerateanddelaylongexposure time, continuoustoexposure timeetc.inautomaticexposure maximumwhenintervalisstop. lowilluminanceenvironmentundernoiserelativelysmallbutframeratewilldecreaselow.

  • fixedframeratemodeisindicateautomaticexposureAdjustwhenkeepframeratenotchange, lowilluminanceenvironmentundernoisewillrelativelylarge.

[Related Data Types and Interfaces]

None.

4.5.2.2. ISP_AE_STRATEGY_E

[Description]

Define AEexposurestrategymode.

[Definition]

typedef enum _ISP_AE_STRATEGY_E
{
  AE_EXP_HIGHLIGHT_PRIOR = 0,
  AE_EXP_LOWLIGHT_PRIOR  = 1,
  AE_STRATEGY_MODE_BUTT
} ISP_AE_STRATEGY_E;

[Members]

Member Name

Description

AE_EXP_HIGHLIGHT_PRIOR

heightlightpriorityexposuremode.

AE_EXP_LOWLIGHT_PRIOR

lowlightpriorityexposuremode.

[Precautions]

  • linearmodeunder, AEalgorithmDefaultexposurestrategyisheightlightpriority, fullyamountavoidimagethroughexposure, butinbacklightscenewhen, darkprocessbrightnessrelativelylow. thiswhenifneedconcerndarkprocessregion, cancaptureuselowlightprioritymode, butbrightprocesseasythroughexposure.

  • WDRmodeunder, AEalgorithmDefaultuselowlightprioritymode, Controllong frameexposure, thiswhenmanualexposure time, maximumminimumexposure time, AE_Route, AE_Route_Exinexposure timeparameternumberaffectslong frameexposure time. ifswitchisheightlightprioritymode, thenControlshort frameexposure, thiswhenmanualexposure time, maximumminimumexposure time, AE_Route, AE_Route_Exinexposure timeparameternumberaffectsshort frameexposure time.

[Related Data Types and Interfaces]

None.

4.5.2.3. ISP_AE_DELAY_S

[Description]

Define AEdelaywhenattribute.

[Definition]

typedef struct _ISP_AE_DELAY_S
{
  CVI_U16 u16BlackDelayFrame;
  CVI_U16 u16WhiteDelayFrame;
} ISP_AE_DELAY_S;

[Members]

Member Name

Description

u16BlackDelayFrame

imagebrightnesssmallintargetbrightnesswhenintervalexceedthroughu 16BlackDelayFrameframewhen, AEopenstartAdjust.

u16WhiteDelayFrame

imagebrightness greater thantargetbrightnesswhenintervalexceedthroughu 16WhiteDelayFrameframewhen, AEopenstartAdjust.

[Precautions]

  • u16BlackDelayFrame/u16WhiteDelayFrameSetthe morelarge, inAEAdjuststep sizerelativesame caseunder, Adjusttotargetbrightnessneed tothe morelongwheninterval. human visionforthroughexposureratiorelativelysensitive, recommendedu16WhiteDelayFrameneedSetobtainratiou16BlackDelayFramesmallonesome.

  • ifframeraterelativelylowwhen, recommendedu16BlackDelayFrame/u16WhiteDelayFramenotneedSetthroughlarge, whetherthenAEconvergencewhenintervalwillrelativelylong.

[Related Data Types and Interfaces]

None.

4.5.2.4. ISP_AE_RANGE_S

[Description]

Define exposure timeorgainmaximum valueandminimumvalue.

[Definition]

typedef struct _ISP_AE_RANGE_S
{
  CVI_U32 u32Max;
  CVI_U32 u32Min;
} ISP_AE_RANGE_S;

[Members]

Member Name

Description

u32Max

maximumvalue.

u32Min

minimumvalue.

[Precautions]

minimumvaluenotcanlargeinmaximumvalue.

[Related Data Types and Interfaces]

None.

4.5.2.5. ISP_ANTIFLICKER_MODE_E

[Description]

Define anti-flickermode.

[Definition]

typedef enum _ISP_ANTIFLICKER_MODE_E
{
  ISP_ANTIFLICKER_NORMAL_MODE = 0x0,
  ISP_ANTIFLICKER_AUTO_MODE = 0x1,
  ISP_ANTIFLICKER_MODE_BUTT
} ISP_ANTIFLICKER_MODE_E;

[Members]

Member Name

Description

ISP_ANTIFLICKER_NORMAL_MODE

normalanti-flickermode.

ISP_ANTIFLICKER_AUTO_MODE

automaticanti-flickermode.

[Precautions]

  • ISP_ANTIFLICKER_NORMAL_MODEisnormalanti-flickermode, exposure timecanaccording tobrightnessperformAdjust, minimumexposure timefixedis1/120 sec (60Hz) or1/100 sec(50Hz), notbe affected byexposure timeminimumvalue limit.

    • havelamplight environment: exposure timecanandlight sourcefrequencyrelativematchmatch, canenoughpreventimageflicker.

    • heightbrightness environment: brightnessthe moreheight, requireexposure timethenthe moreshort. andnormalanti-flickermode minimumexposure timeandnotwillaccording toheightbrightnessperformAdjust, becausethiswillproducethroughexposurecase.

  • ISP_ANTIFLICKER_AUTO_MODEisautomaticanti-flickermode, exposure timecanaccording tobrightnessperformAdjust, minimumexposure timecanreachtosensor minimumexposure time. andnormalanti-flickermode differenceothermainlyinheightbrightness environmentbodycurrent.

    • heightbrightness environment: minimumexposure timecanreachtosensor minimumexposure time, canenoughvalidsuppressthroughexposure, butthiswhenanti-flickerinvalid.

[Related Data Types and Interfaces]

None.

4.5.2.6. ISP_ANTIFLICKER_S

[Description]

Define anti-flickerattribute.

[Definition]

typedef struct _ISP_ANTIFLICKER_S
{
  CVI_BOOL bEnable;
  ISP_AE_ANTIFLICKER_FREQUENCE_E   enFrequency;
  ISP_ANTIFLICKER_MODE_E enMode;
} ISP_ANTIFLICKER_S;

[Members]

Member Name

Description

bEnable

bEnable

isCVI_TRUEwhenEnableimageanti-flicker,

isCVI_FALSEwhennotEnableimageanti-flicker.

enFrequency

anti-flickerfrequencyvalue.

Value Range: [0, 1],

Default Value: is0. 0: 60Hz 1: 50Hz

enMode

anti-flickermode, normalanti-flickerorautomaticanti-flicker.

[Precautions]

anti-flickeropenenableafterexposure timewillbe affected bytomaximum/minimumexposure time limit, ifminimumanti-flickerwhenintervallargeinmaximumexposure time, thenopenenableanti-flickerafterexposure timewillislimitismaximumexposure time.

[Related Data Types and Interfaces]

4.5.2.7. ISP_SUBFLICKER_S

[Description]

Define ISPimagesubanti-flickerattribute.

[Definition]

typedef struct _ISP_SUBFLICKER_S
{
  CVI_BOOL bEnable;
  CVI_U8   u8LumaDiff;
} ISP_SUBFLICKER_S;

[Members]

Member Name

Description

bEnable

bEnable isCVI_TRUEwhenEnableimagesubanti-flickerfunction, isCVI_FALSEwhennotEnableimagesubanti-flicker.

u8LumaDiff

anti-flickerdegreeSet, range [0x0, 0x64]. subanti-flickerfunctiontakes effectwhen, the larger this valuethe moreclose toinanti-flicker.

[Precautions]

  • strongcontrolanti-flickermodewhen, minimumexposure timefixedis1/120 sec (60Hz) or1/100 sec(50Hz), ina certainsomescene (such asindoorinsideforaccurateindooroutsidewindowuser backgroundlightscene) imagecancanwillthroughexposuresevere, butnotanti-flickerimageworkfrequencyflicker againratiorelativelysevere. inthiskindcaseunderincludesubanti-flickermodeisistakeobtainthroughexposureandflickerofinterval flatbalance. instrongcontrolanti-flickermodeunder, whensubanti-flickerfunctiontakes effectwhen, ifimagebrightnesssmallin(AeCompensation + u8LumaDiff), thenexposure timestillwillfixedisminimumanti-flickerwheninterval1/120 sec (60Hz) or1/100 sec(50Hz)usingpreventimageflicker. ifimagebrightness greater than(AeCompensation + u8LumaDiff), thentakeremoveanti-flicker, Adjustimagetargetbrightnessis(AeCompensation + u8LumaDiff), throughincludeonesetdegree imageflickertoavoidimagethroughexposuresevere.

  • onlyhaveinfullsufficientopenopenanti-flicker, strongcontrolanti-flickermodeandanti-flickerfrequencyvaluenotetc.in0 beforeraiseunder, subanti-flickerfunctiononly thencantakes effect.

[Related Data Types and Interfaces]

None.

4.5.2.8. ISP_FSWDR_MODE_E

[Description]

Define ISP FSWDRRunmode.

[Definition]

typedef enum _ISP_FSWDR_MODE_E
{
  ISP_FSWDR_NORMAL_MODE = 0x0,
  ISP_FSWDR_LONG_FRAME_MODE = 0x1,
  ISP_FSWDR_AUTO_LONG_FRAME_MODE = 0x2,
  ISP_FSWDR_MODE_BUTT
}ISP_FSWDR_MODE_E;

[Members]

Member Name

Description

ISP_FSWDR_NORMAL_MODE

positive oftenFSWDRmode, thiswhenAEandsynthesismoduleaccording toautomatic/manualexposureratioperformworkoperation.

ISP_FSWDR_LONG_FRAME_MODE

long-frame mode, thiswhenAEwillshort frameexposurewhen intervalSetisminimumvalue, long frameexposure timeclose to1frametheallowmaximum value, synthesismoduleonlyoutputlong framenumberdata, canuseinexcellenttransformweakwidthdynamicsceneorlowilluminancewhen imagequalityamount.

ISP_FSWDR_AUTO_LONG_FRAME_MODE

automatic long-frame mode, thiswhenAEshort frameexposure timenotwillexceedthroughsensorlimit long-frame modeundershort framemaximumexposure time, inexposureamountexceedthroughsensorSet thresholdwhen, automaticswitchislong-frame mode, synthesismoduleonlyoutputlong framenumberdata.

[Precautions]

  • long-frame modeonlyinlinemodeWDRundervalid, automatic long-frame modeonlyin2to1linemodeWDRundervalid, andandisguaranteeimagequalityamount, WDRmodule motiondetectionandlongshort framefusionthresholdaverageisautomaticconfiguration, not supportedmanualconfiguration. inlinewillmodeswitchtoWDRmode, DefaultisnormalFSWDRmode.

  • automatic long-frame modeunder, manualexposureratiotakes effect, ifmanualexposureratiolargein1, that ismakeexposureamountlargeinSet thresholdalsonotwillenterlong-frame mode; ifmanualexposureratiois1, thenwillautomaticenterlong-frame mode.

[Related Data Types and Interfaces]

None.

4.5.2.9. ISP_AE_GAIN_TYPE_E

[Description]

Define gainuse method.

[Definition]

typedef enum _ISP_AE_GAIN_TYPE_E {
  AE_TYPE_GAIN = 0,
  AE_TYPE_ISO = 1,
  AE_TYPE_BUTT
} ISP_AE_GAIN_TYPE_E;

[Members]

Member Name

Description

enGainType

0 : use gain

1 : use ISO num

[Precautions]

None.

4.5.2.10. ISP_AE_ATTR_S

[Description]

Automatic Definitionexposure attributes.

[Definition]

typedef struct _ISP_AE_ATTR_S
{
  ISP_AE_RANGE_S stExpTimeRange;
  ISP_AE_RANGE_S stAGainRange;
  ISP_AE_RANGE_S stDGainRange;
  ISP_AE_RANGE_S stISPDGainRange;
  ISP_AE_RANGE_S stSysGainRange;
  CVI_U32 u32GainThreshold;
  CVI_U8 u8Speed;
  CVI_U16 u16BlackSpeedBias;
  CVI_U8 u8Tolerance;
  CVI_U8 u8Compensation;
  CVI_U16 u16EVBias;
  ISP_AE_STRATEGY_E enAEStrategyMode;
  CVI_U16 u16HistRatioSlope;
  CVI_U8 u8MaxHistOffset;
  ISP_AE_MODE_E enAEMode;
  ISP_ANTIFLICKER_S stAntiflicker;
  ISP_SUBFLICKER_S stSubflicker;
  ISP_AE_DELAY_S stAEDelayAttr;
  CVI_BOOL bManualExpValue;
  CVI_U32 u32ExpValue;
  ISP_FSWDR_MODE_E enFSWDRMode;
  CVI_BOOL bWDRQuick;
  CVI_U16 u16ISOCalCoef;
  ISP_AE_GAIN_TYPE_E enGainType;
  ISP_AE_RANGE_S stISONumRange;
  CVI_U8 au8AdjustTargetMin[LV_TOTAL_NUM];
  CVI_U8 au8AdjustTargetMax[LV_TOTAL_NUM];
  CVI_BOOL bEnableFaceAE;
  CVI_U8 u8FaceTargetLuma;
  CVI_U8 u8FaceWeight;
  CVI_U8 u8HighLightLumaThr;
  CVI_U8 u8HighLightBufLumaThr;
  CVI_U8 u8LowLightLumaThr;
  CVI_U8 u8LowLightBufLumaThr;
  CVI_BOOL bHistogramAssist;
  CVI_U16 u16AEStrategyThr;
  CVI_U32 au32Reserve[RESERVE_SIZE];
} ISP_AE_ATTR_S;

[Members]

Member Name

Description

stExpTimeRange

exposure timerange, set setmaximumvalueandminimumvalue, usingmicroseconds(us)as the unit.

Value Range: [0x0, 0xFFFFFFFF],

specificrangeand: sensorrelated.

stISONumRange

ISO num range, Setmaximumvalueandminimumvalue, thissettingsonlyinenGainType = AE_TYPE_ISO whenvalid.

Value Range: [0x64, 0xFFFFFFFF],

specificrangeand: sensorrelated.

stAGainRange

Sensoranalog gainrange , Setmaximumvalueandminimumvalue, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF],

specificrangeand: sensorrelated.

stDGainRange

Sensordigital gainrange , Setmaximumvalueandminimumvalue, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF],

specificrangeand: sensorrelated.

stISPDGainRange

ISPdigital gainrange , Setmaximumvalueandminimumvalue, 10bitfractional precision.

Value Range: [0x400, 0x7FFF].

stSysGainRange

systemsystemgainrange , Setmaximumvalueandminimumvalue, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF],

specificrangeand: sensorrelated.

u32GainThreshold

automaticdecrease framewhen systemsystemgainthresholdvalue, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF],

Default Value: is 0x400000

u8Speed

automaticexposureAdjustwhen speed.

Value Range: [0x0, 0xFF],

Default Value: is0x40.

u16BlackSpeedBias

imagebydarktobrightAEAdjustspeed biasdifferencevalue , the larger this value, imagefromdarktobright speedthe morefast.

Value Range: [0x0, 0xFFFF],

Default Value: is0x90.

u8Tolerance

automaticexposureAdjustwhenforimagebrightness tolerancebiasdifference.

Value Range: [0x0, 0xFF],

Default Value: is0x2.

u8Compensation

automaticexposureAdjustwhentarget brightness.

Value Range: [0x0, 0xFF],

Default Value: is0x38.

u16EVBias

automaticexposure Adjustwhen exposureamountbiasdifferencevalue, 10bitfractional precision.

Value Range: [0x0, 0xFFFF],

Default Value: is0x400.

enAEStrategyMode

automaticexposurestrategy, heightlightpriorityorlowlightpriority,

Default Value: is AE_EXP_HIGHLIGHT_PRIOR

u16AEStrategyThr

height/lowlightprioritymodewhen, Setenterheightlowlightprioritystatus threshold, normal modeunderwhen, thisvaluesisfullsufficientcondition AE grid numberpurpose, bHistogramAssist enable whenthisvaluesisfullsufficientcondition pixelpointnumberpurpose* 1/1000 * u16AEStrategyThr.

Value Range: [0x1, 0x3E8],

Default Value: is0x2.

u16HistRatioSlope

height/lowlightprioritywhen, Adjusttargetbrightness step.

Value Range: [0x0, 0xFFFF],

Default Value: is0x8.

u8MaxHistOffset

sense interestregionforsystemstatisticalaveragevalueaffects maximumdegree.

Value Range: [0x0, 0xFF],

Default Value: is0x10.

enAEMode

automaticexposuremode, automaticdecreaseframemodeorfixedframeratemode.

Default Value: is AE_MODE_FIX_FRAME_RATE

stAntiflicker

anti-flickerattributeSet. Defaultanti-flickernotEnable.

stSubflicker

subanti-flickerattributeSet. Defaultsubanti-flickernotEnable.

stAEDelayAttr

delaywhenattributeSet. Defaultu16BlackDelayFrame=0u16WhiteDelayFrame=0.

bManualExpValue

manualexposureamountmake can, thevalueisCVI_TRUEwhen, AEalgorithmcaptureuseu32ExpValueoperationiscurrentexposureamountperformexposure timeandgainetc. partmatch, isCVI_FALSEwhencaptureuseautomaticcalculate exposureamountperformpartmatch.

Default Value: isCVI_FALSE.

u32ExpValue

manualexposureamountvalue, etc.inexposure time(linenumber)*systemsystemgain(6bitfractional precision).

Default Value: is 0 Value Range: (0x0, 0xFFFFFFFF].

enFSWDRMode

FSWDRRunmode. DefaultisISP_FSWDR_NORMAL_MODE.

bWDRQuick

WDRmodeunder, AEalgorithmfromstablestatus (brightnesserror differencesmallinetc.intolerancebiasdifferencevalueu8Tolerance) againnewAdjustwhen, Defaultbefore50frameAdjustwillperformwhendomainfiltering, usingAdjustmoreaddsmooth. thevalueisCVI_TRUEwhen, takeremove50framewhendomainfiltering, makeAEconvergencespeedmorefast. The default value isCVI_FALSE.

u16ISOCalCoef

ISOcalibrationsystemnumber, useinguaranteecapturetheneedD CFinformationindisplay ISOisstandard , 8bitprecision.

Value Range: [0x0, 0xFFFF],

Default Value: is0x100.

enGainType

selectusingISO Numorpersonis Gain methodtoControlgain

au8AdjustTargetMin

settingsenvironmentbrightnesseach LV AEconvergencetarget brightnessminimum value

Value Range: : (0x0, 0x100) LV -5 ~ 15

Default Value: is{ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 45, 50, 50, 50, 50, 50, 50, 60, 60, 60}

au8AdjustTargetMax

settingsenvironmentbrightnesseach LV AEconvergencetarget brightnessmaximum value

Value Range: : (0x0, 0x100) LV -5 ~ 15

Default Value: is{ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 60, 60, 60, 60, 60, 60, 60, 70, 70, 70}

bEnableFaceAE

faceidentifycontinuousmove AE measurelight(Face AE)Enable

u8FaceTargetLuma

facemeasurelighttarget brightness(8 bits)

u8FaceWeight

facemeasurelightandoverallenvironmentmeasurelight weightratioexample

u8HighLightLumaThr

heightbright region brightnessthreshold

u8HighLightBufLumaThr

heightbrightbufferregion brightnessthreshold

u8LowLightLumaThr

lowbright region brightnessthreshold

u8LowLightBufLumaThr

lowbrightbufferregion brightnessthreshold

bHistogramAssist

usehistogramFiguresystemstatisticalvalue toauxiliaryheightlightstrategy, shouldforheightlightregionsmallinoneblock size case

au32Reserve[RESERVE_SIZE]

reservedcharactersegment, Nonemeaning

[Precautions]

  • automatic modeunder, morechangemanualexposure attributes valuenotwilltakes effect.

  • automaticexposure maximumminimumwhenintervalandgain.

canaccording todifferent sceneforexposure timeandgainperformlimit, such ashaveheightspeedmotionobjectscenecanlimitmaximumexposure timevalueisrelativelysmallvalue, thisformcanreducelightmotionobjectghostingcurrentimage.

  • automaticexposure systemsystemgain

if(sensoranalog gainminimumvalue*sensordigital gainminimumvalue*ISPdigital gainminimumvalue)smallinsystemsystemgainminimumvalue, thenAEalgorithminternalcalculatewhenminimumgainwillislimittosystemsystemgainminimum value. if(sensoranalog gainmaximumvalue*sensordigital gainmaximumvalue*ISPdigital gainmaximumvalue)largeinsystemsystemgainmaximumvalue, thenAEalgorithminternalcalculatewhenmaximumgainwillislimittosystem systemgainmaximum value. recommendthroughSetsystemsystemgain maximum, minimumvalueperformgainlimit, respectivelylimitsensoranalog gain, sensordigital gainandISPdigital gainwhen, ifhandlerelativelyheightprecision ISPdigital gainlimitto1x, easycauseflicker. actualon, AEalgorithminternalbenefitusesystemsystemgaintocalculatemaximum/minimumexposureamount, andandnotisdirectlimita certainitemgain value. ratiosuch assaysystemsystemgainmaximumvaluelimitis 1x, butsensoranalog gainminimum valuelimitis2x, thenactualtakes effectresultusingsensoranalog gain limitisaccurate, sensordigital gainandISPdigital gain limitalsohavesameprinciple.

  • automaticdecreaseframewhen systemsystemgainthresholdvalue

inSLOW_SHUTTERmodeunder, whensystemsystemgainreachtotheSet thresholdvaluewhen, systemsystemwillautomaticenterSLOW_SHUTTERmode.

  • u8Speeduseinsettingsautomaticexposurewhen convergencespeed, the larger this valueexposure convergencespeedthe morefast, butalsowillcauseconvergenceprocessinoutputcurrentreverserepeatoscillation.

  • u16BlackSpeedBiasuseinsettingsimagebydarktobrightAEAdjustspeed biasdifferencevalue. Defaultu8Speedunder, imagefrombrighttodark speedwillfastinimagefromdarktobright speed, ifwantdualdirectionalAEAdjustspeeddifferencenotmultiple, canadjustheightu16BlackSpeedBias.

  • brightnesscompensationattributeu8CompensationuseinAdjustexposuretarget brightness. exposurebrightnesscompensationthe larger the valuethenimagebrightnessthe moreheight.

  • exposurebiasdifferenceattributeu16EVBiasuseininspecialsceneunderforimagetarget brightnessperformslightadjust, alsocanconsiderisismoreheightprecision brightnesscompensationvalue, throughAdjustthevaluetochangechangeimagetargetbrightness, actualtakes effect AEtargetbrightnessisu8Compensation* u16EVBias/1024. u8Compensationnotchangewhen, the larger this valuethenimagebrightnessthe moreheight.

  • exposuretolerancebiasdifferenceattributeu8ToleranceuseinAdjustexposureforenvironment sensitivedegree, exposuretolerancebiasdifferencethe larger the valuethenexposurethe morenotsensitive, andcancancausesameonetargetbrightnessvaluemultipletimeAdjustobtainto brightnessdifferencethe morelarge, theusingtheattributerecommendnotcansettingsthroughlarge.

  • exposurestrategyattributeenAEStrategyModeuseinselectforheightlightpriorityorlowlightpriority exposurestrategy. heightlightprioritymeansforheightlightsensitive, fullyamountavoidimagethroughexposure. lowlightprioritymeansforlowlightsensitive, fullyamountsee clearlydarkprocessregion, notmanageimagewhetherthroughexposure. Default exposurestrategyisheightlightpriority, usercanaccording tosceneneed toperformAdjust, heightlightprioritywhen, usercansettingsu8HighLightLumaThr todeterminesheightlightregion brightnessthreshold, whenimageinhaveexceedthroughthisbrightnessthreshold windows (the windows weightnotis 0)when, thenwilldecreaselowtargetbrightnesstosuppressthisheightlight windows brightness,whenall windows brightnessallsmallu8HighLightBufLumaThr when, thenrestoretooriginalthissettingstarget brightness,lowlightprioritywhen, whenimageinhavelowinthis u8LowLightLumaThr brightnessthreshold windows (the windows weightnotis 0)when, thenwillraiseheighttargetbrightnesstostretchbrightthislowlight windows brightness,whenall windows brightnessalllargein u8LowLightBufLumaThrwhen, thenrestoretooriginalthissettingstarget brightness.

  • u16HistRatioSlopeuseinsettingssenseinterestregion weight. ifisheightlightpriorityexposuremode, thenthevalueSet isheightlightregion weight, the larger this value, thenmeansforheightlightregionthe moresensitive. and vice versa, ifislowlightprioritymode, thenthevalueSet islowlightregion weight, the larger this value, thenmeansfordarkprocessregionthe moresensitive, recommendedu16HistRatioSlope valueSetnotneedexceedthrough0x100.

  • automaticexposurewhen, cansettingssenseinterestregionforsystemstatisticalaveragevalueaffects maximumdegreeu8MaxHistOffset. thevaluerelativewheninforraiseheightu16HistRatioSlopewhenincrease weightperformlimit, ifthevalueis0 , Nonetheoryu16HistRatioSlopemultiplelarge, alsonotwillforheightlightorlowlightregionperformspecialprocessing, thiswhen systemstatisticalaveragevaluethenisrawvalue. throughreasonableSetthevalue, canguaranteeanysceneAEstableafterimageaveragebrightnessallinonesetrangeinside, inheightlightpriorityexposuremodeunder, ifthevalueSetrelativelylarge, inforratiodegreeslightlyheightonesome scene, such assunny dayindooroutsidescene, haveskyhavevegetation, thencancancauseoverallimagebrightnessbiaslow, becauseisthiswhenpriorityguaranteebright regionsky effect, throughlimitthevaluefromandlimitforbright region tiltdiagonaldegreecansolvetheproblem.

  • exposurestrategyswitchwhen, mostgoodat the same timemorenewu16HistRatioSlopeandu8MaxHistOffset value, whetherthenthis2valuewillcaptureuseononekindstrategyunder configuration, effectcancanandpreperiodnotsymbol.

  • inperformstronglightsuppressschemewhen, recommendedinheightlightpriorityexposuremodeunder, throughdecreaselowAEtargetbrightness, at the same timereasonableSetu16HistRatioSlopeandu8MaxHistOffsettosuppressstronglight, dark regionthencanthroughEnableDRCtosee clearly. lowlightprioritythencanuseinimplementnon-indicatesetregion backgroundlightcompensation.

  • AEexposureControltypeisautomaticwhen, cansettingsexposuremodeenAEMode. thevaluecansettingsisslowshutter mode(SLOW_SHUTTER)orfixedframeratemode. slowshutter modepassoftenuseinlowilluminancesceneunderperformautomaticdecreaseframe, usingreducelessimagenoise.

  • anti-flickerattributestructurestAntiflickercanuseinsettingsanti-flickerEnable, anti-flickerfrequencyandanti-flickermodeetc.attribute. FSWDRmodeunder, onlyforlong frameanti-flickervalid. byinasexposureratio change, short frameexposure timemaximum valuewillbe affected bytolimit, recommendedFSWDRmodeuseautomaticanti-flickermode.

  • subanti-flickerattributestructurestSubflickercanuseinsettingssubanti-flickerEnableandanti-flickerdegreeattribute. ifhaveautomaticaperture, recommendedDisablesubanti-flickerfunction.

  • AEexposureControltypeisautomaticwhen, cansettingsAEdelaywhentakes effectattributestructurestAEDelayAttr. thevalue reasonableSetcanraiseheightimagebrightness stableproperty, preventfastspeedmotionobjectthroughthroughcauseimagebrightnesssendgeneratechange. lowcoderateSetwhenshouldtheadaptwhenincreasethevalue, usingavoidAEAdjustwhenoutputcurrentblockeffectshould.

  • usercanthroughwillbManualExpValuesetisCVI_TRUE, manualSetexposureamountu32ExpValuetomaskAEalgorithm exposureamountAdjustpart, onlyusetoexposureamountpartmatchpart. u32ExpValue valuewillbe affected bytomaximum, minimumexposureamount limit. maximum, minimumexposureamountrespectivelycorrespondingmaximum, minimumexposure timeandgain product.

  • FSWDRRunmodechangechangewhen, need tocorrespondingmodifycmos.cin usingundercallback function:

cmos_get_ae_default, cmos_fps_set, cmos_get_inttime_max, usingguaranteelong, short frameexposure timeinreasonablerangeinside. normalWDRandlong-frame modeswitchwhen, willcallbackcmos_get_ae_default, morenewexposure timemaximum/minimumvalue, gainmaximum/minimumvalue, aperturemaximum/minimumvalueandAE compensationetc.parameternumber, at the same time, AEinternalwillwillu16HistRatioSlopeandu8MaxHistOffsetmorenewisalgorithmDefault Value. need toNote is, thiswhenexposureratiorelatedSetnotwillmorenew, stillwillkeepononetime value.

  • au8AdjustTargetMin/ au8AdjustTargetMax canfordifferent environmentbrightnesssettingsdifferenttarget brightnessminimum/largevalue, AE willaccording tocurrent environmentbrightnessconvergencetargetbrightnesstotheregionintervalinside

[Related Data Types and Interfaces]

4.5.2.11. ISP_ME_ATTR_S

[Description]

Manual Definitionexposure attributes.

[Definition]

typedef struct _ISP_ME_ATTR_S
{
  ISP_OP_TYPE_E enExpTimeOpType;
  ISP_OP_TYPE_E enAGainOpType;
  ISP_OP_TYPE_E enDGainOpType;
  ISP_OP_TYPE_E enISPDGainOpType;
  CVI_U32 u32ExpTime;
  CVI_U32 u32AGain;
  CVI_U32 u32DGain;
  CVI_U32 u32ISPDGain;
  ISP_OP_TYPE_E enISONumOpType;
  ISP_AE_GAIN_TYPE_E enGainType;
  CVI_U32 u32ISONum;
} ISP_ME_ATTR_S;

[Members]

Member Name

Description

enExpTimeOpType

manualexposure whenintervalEnable,

Default Value: isOP_TYPE_AUTO

enAGainOpType

manualsensormodesimulate gainEnable,

Default Value: isOP_TYPE_AUTO

enDGainOpType

manualsensornumbercharacter gainEnable,

Default Value: isOP_TYPE_AUTO

enISPDGainOpType

manualISPnumbercharacter gainEnable,

Default Value: isOP_TYPE_AUTO

u32ExpTime

manualexposure time, usingmicroseconds(us)as the unit,

Default Value: is0x4000.

Value Range: [0x0, 0xFFF FFFFF],

specificrangeand: sensorrelated.

u32AGain

manualsensoranalog gain, 10bitfractional precision,

Default Value: is0x400.

Value Range: [0x400, 0xFFF FFFFF],

specificrangeand: sensorrelated.

u32DGain

manualsensordigital gain, 10bitfractional precision,

Default Value: is0x400.

Value Range: [0x400, 0xFFF FFFFF],

specificrangeand: sensorrelated.

u32ISPDGain

manualISPdigital gain, 10bitfractional precision,

Default Value: is0x400.

Value Range: [0x400, 0x 40000],

specificrangeand: sensorrelated.

enISONumOpType

selectusing ISO Num or gain methodControlgain,

Default Value: is 0

enGainType

gainuse method

u32ISONum

manual ISO Num gain,

Default Value: is100, onlyin enGainType = AE_TYPE_ISO haveoperationuse.

[Precautions]

  • manual modeunder, manualexposure timeandgain valuewillbe affected bytoautomatic modeundermaximum/minimumexposure timeandgain limit.

  • manualexposureEnableparameternumbervalidwhen, mustSetcorresponding manualexposureparameternumber, ifnotSet, thencaptureusesystemsystemDefault Value: .

  • gainunitis10bitfractional precision xnumber, that is1024replacetable1x.

  • ifexposureparameternumberSetexceedoutputmaximum (small) value, willusesensorsupport maximum (small) valuereplace.

[Related Data Types and Interfaces]

4.5.2.12. ISP_EXPOSURE_ATTR_S

[Description]

Define ISPexposure attributes.

[Definition]

typedef struct _ISP_EXPOSURE_ATTR_S
{
  CVI_BOOL bByPass;
  ISP_OP_TYPE_E enOpType;
  CVI_U8 u8AERunInterval;
  CVI_BOOL bHistStatAdjust;
  CVI_BOOL bAERouteExValid;
  ISP_ME_ATTR_S stManual;
  ISP_AE_ATTR_S stAuto;
  CVI_U8  u8DebugMode;
  CVI_BOOL bAEGainSepCfg;
  CVI_S8 s8SensorSensitivity;
} ISP_EXPOSURE_ATTR_S;

[Members]

Member Name

Description

bByPass

AEmodulebyp assfunction enable, DefaultisCVI_FALSE.

enOpType

automaticexposureormanual exposureopenclose, DefaultisOP_TYPE_AUTO.

u8AERunInterval

AEalgorithmRun intervalinterval, The value range is[1,255].

The value is1whenindicateseachframeallRunAEalgorithm; The value is2whentableeach2frameRun1timeAEalgorithm, relythistypepush.

recommendedthevalueSetnotneedlargein2,

whetherthenAEAdjustspeedwillbe affected bytoaffects.

WDRmodewhen, thevaluerecommendedSetis1, thisformAEconvergencewillmoreaddsmooth. thevalueDefaultis1.

bHistStatAdjust

thisparameternumberwillpresslow AE forbright region measurelightbrightness, makebright regionmorebright,forlargeareaskyscene,ifmeasurelightbiasdark,cansettingsthisparameternumberDefaultis 0

bAERouteExValid

AEextensionallocation routewhethertakes effectopenclose

CVI_TRUEwhenuseAEextensionallocation route, whetherthenusenormalAEallocation route.

DefaultisCVI_FALSE.

s8SensorSensitivity

AESetsensor senselightdegreevalues, useincorrectionbecausesensor senselightdegreenotconsistentcauseLV valuecalculatedifference, The default value is0.

Value Range: [-0xA, 0xA]

stManual

manualexposure attributesstructure

stAuto

automaticexposure attributesstructure

u8DebugMode

Set AE debug mode, useindumplogetc.debugfunction, normalis 0

bAEGainSepCfg

longshort framegainwhetherpartopenpartmatch

[Precautions]

  • AE ByPassisCVI_TRUEwhen, AEmoduleisbypass, anyAEconfigurationallnotwillforimagebrightnessproduceaffects. ISP_AE_RESULT_S`_ keepisAE bypassbeforeoneframe value.

  • WDR/linearmodeswitchwhen, u8AERunIntervalwillagainsetis1, usercaninswitchcompleteafter, according toneed tomodifythevalue.

  • bAEGainSepCfgonlyin2to1WDR modeunderconfigurationandsensor supportthisfunctiononly thencantakes effect.

  • manual modenot supportedlongshort framegainpartopenpartmatch

[Related Data Types and Interfaces]

4.5.2.13. ISP_WDR_EXPOSURE_ATTR_S

[Description]

Define WDRmodeunder exposure attributes.

[Definition]

#define EXP_RATIO_NUM       (3)
typedef struct _ISP_WDR_EXPOSURE_ATTR_S
{
  ISP_OP_TYPE_E enExpRatioType;
  CVI_U32 au32ExpRatio[EXP_RATIO_NUM];
  CVI_U32 u32ExpRatioMax;
  CVI_U32 u32ExpRatioMin;
  CVI_U16 u16Tolerance;
  CVI_U16 u16Speed;
  CVI_U16 u16RatioBias;
  CVI_U8 u8SECompensation;
  ISP_CHANNEL_LIST_E enExpMainChn;
  CVI_U8 au8LEAdjustTargetMin[LV_TOTAL_NUM];
  CVI_U8 au8LEAdjustTargetMax[LV_TOTAL_NUM];
  CVI_U8 au8SEAdjustTargetMin[LV_TOTAL_NUM];
  CVI_U8 au8SEAdjustTargetMax[LV_TOTAL_NUM];
} ISP_WDR_EXPOSURE_ATTR_S;

[Members]

Member Name

Description

enExpRatioType

onlyinmultipleframesynthesisWDRmodeundervalid.

OP_TYPE _AUTO: according tosceneautomaticcalculatelongshort frameexposureratio;

O P_TYPE_MANUAL: manualconfigurationlongshort frameexposureratio.

au32ExpRatio

onlyinmultipleframesynthesisWDRmodeundervalid.

whenenExpRatioTypeisOP_TYPE_AUTOwhen, au32ExpRatioinvalid.

whenenExpRatioTypeisOP_TYPE_MANUALwhen, au32ExpRatioindicatestwoframesynthesisWDRrelativeadjacent2frameexposureratioexpectedvalue.

whereau32ExpRatio[0]operationislong exposure/short exposureexposureratio, . 6bitfractional precision, 0x40indicatesexposureratiois1x.

Value Range: [0x40, 0xFFF]

u32ExpRatioMax

onlyinmultipleframesynthesisWDRmodeundervalid.

whenenExpRatioTypeis OP_TYPE_AUTOwhen, u32ExpRatioMaxindicatesmostlong frameandmostshort frameexposure timeratiovaluemaximum value.

that is2framesynthesiswhenindicateslong exposure/short exposureexposureratiomaximum value.

whenenExpRatioTypeisO P_TYPE_MANUALwhen, u32ExpRatioMaxinvalid. 6bitfractional precision, 0x40indicatesexposureratiois1x.

Value Range: [0x40, 0x4000]

u32ExpRatioMin

onlyinmultipleframesynthesisWDRmodeundervalid.

whenenExpRatioTypeisOP_TYPE_AUTOwhen, u32ExpRatioMinindicateslong frameexposure timeandshort frameexposure timeratiovalueminimum value.

whenenExpRatioTypeisOP_TYPE_MANUALwhen, u32ExpRatioMininvalid.

formatisNonesymbolNo. 6.6bitsetpoint, 0x40indicateslong frameexposure timeandshort frameexposure time ratiovalueis1x.

Default Value: is0x40.

Value Range: [0x40,u32ExpRatioMax]

u16Tolerance

exposureAdjustwhenforimagebrightness tolerancebiasdifference , onlyintwoframesynthesisWDRmodeundervalid.

Default Value: is5 Value Range: [0x0, 0xFF]

u16Speed

automaticexposureratio Adjustspeed, onlyintwoframesynthesisWDRmodeundervalid.

whenenExpRa tioTypeisOP_TYPE_AUTOwhen, the larger this value, automaticexposureratioAdjustspeedthe morefast.

Default Value: is0x20.

Value Range: [0x0, 0xFF]

u16RatioBias

exposureratiobiasdifferencevalue, onlyinmultipleframesynthesisWDRmodeundervalid.

whenenExpRatioTypeis OP_TYPE_AUTOwhen, the larger this value, automaticexposureratiothe morelarge.

Default Value: is0x400, indicatesnotforautomaticexposureratioalgorithm calculateresultperformAdjust.

throughthroughthevalueAdjust exposureratiowillbe affected bytoexposureratiomaximum/minimumvalue limit.

Value Range: [0x0, 0xFFFF]

u8SECompensation

short exposuretarget brightness

Default Value: is 56

enExpMainChn

AEselect mainlychannel

Default Value: is ISP_CHANNEL_LE

au8LEAdjustTargetMin

settingslong exposureenvironmentbrightnesseach LV AE convergencetarget brightnessminimum value

Value Range: : (0x0, 0x100),LV -5 ~ 15

Default Value: is{ 15, 15, 15, 15,15, 15, 15, 20, 20, 25, 30, 35, 40, 40, 50, 50, 55, 60, 60, 60, 60}

au8LEAdjustTargetMax

settingslong exposureenvironmentbrightnesseach LV AE convergencetarget brightnessmaximum value

Value Range: (0x0, 0x100),LV -5 ~ 15

Default Value: is{25, 25, 25, 25,25, 25, 25, 30, 30, 35, 40, 45, 50, 50, 60, 60, 70, 75, 75,75, 75}

au8SEAdjustTargetMin

settingsshort exposureenvironmentbrightnesseach LV AE convergencetarget brightnessminimum value

Value Range: (0x0, 0x100),LV -5 ~ 15

Default Value: is{5, 5, 5, 5, 5, 5, 5, 10, 10, 15, 15, 15, 15, 20, 20, 20, 20, 20, 20, 20, 20}

au8SEAdjustTargetMax

settingslong exposureenvironmentbrightnesseach LV AE convergencetarget brightnessmaximum value

Value Range: (0x0, 0x100),LV -5 ~ 15

Default Value: is{15, 15, 15, 15,15, 15, 15, 20, 20, 25, 25, 25, 25, 30, 40, 50, 60, 60, 60, 60, 60}

[Precautions]

  • fora certainsomeforshort framemaximumexposure timehavelimit sensor, exposureratiorelativelysmallwhen, long framemaximumexposure timerelativelyshort, imagedynamicrangeandnoisetablecurrentrelativelydifference, causeautomaticexposureratiocalculatenotaccuratecorrect, thiswhenrecommendedlimitminimumexposureratio, guaranteelong framemaximumexposure timetolessreachto3ms.

  • recommendedu16SpeednotneedSetsmallin0x8, avoida certainsomescenebyincalculateprecisionnotsufficientcauseexposureratioAdjusttooslowverytonotadjust. u16Speedthroughlargecancancauseexposureratiochangetoofast, producebecomeimagebrightnessoutputcurrentoscillation.

  • recommendedmanual modeunderu32ExpRationotneedSetlargein0x400. ifexposureratiolargein0x400, inrelativelybright exceedwidthdynamicscene, adaptwhenadjustheightexposureratiowillexcellenttransformlong frameimagenoisetablecurrent. butisinrelativelydarkorlowwidthdynamicscene, ifexposureratiothroughlarge, byinshort framemaximumexposure timewilliscompress, causeimagenoisetablecurrentwillchangedifference, andandwilloutputcurrentobvious noisenotcontinuouscontinue, motiontablecurrentalsowillchangedifference.

[Related Data Types and Interfaces]

4.5.2.14. ISP_AE_ROUTE_NODE_S

[Description]

Define AEallocation routenodeattribute.

[Definition]

typedef struct _ISP_AE_ROUTE_NODE_S
{
  CVI_U32 u32IntTime;
  CVI_U32 u32SysGain;
  ISP_IRIS_F_NO_E enIrisFNO;
  CVI_U32 u32IrisFNOLin;
} ISP_AE_ROUTE_NODE_S;

[Members]

Member Name

Description

u32IntTime

nodeexposure time, in microseconds(us).

Value Range: (0x0, 0xFFFFFFFF]

u32SysGain

nodegain, includesensoranalog gain, sensordigital gainandISPdigital gain, 10bitprecision.

Value Range: [0x400, 0xFFFFFFFF]

enIrisFNO

nodeapertureF valuelargesmall, only supportsP-Iris, not supportedDC-Iris.

Value Range: [ISP_IRIS_F_NO_32_0, ISP_IRIS_F_NO_1_0].

u32IrisFNOLin

nodeapertureFvalueequivalentincrease benefitlargesmall, only supportsP-Iris, not supportedDC-Iris.

Value Range: [1, 1024]

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.2.15. ISP_AE_ROUTE_S

[Description]

Define AEexposureallocation strategyattribute.

[Definition]

#define ISP_AE_ROUTE_MAX_NODES (16)
typedef struct _ISP_AE_ROUTE_S
{
  CVI_U32 u32TotalNum;
  ISP_AE_ROUTE_NODE_S astRouteNode[ISP_AE_ROUTE_MAX_NODES];
} ISP_AE_ROUTE_S;

[Members]

Member Name

Description

u32TotalNum

exposureallocation routenodenumberpurpose, currentlymaximumis16.

astRouteNode[ISP_AE_ROUTE_MAX_NODES]

exposureallocation routenodeattribute.

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.2.16. ISP_AE_ROUTE_EX_NODE_S

[Description]

Define AEextensionallocation routenodeattribute.

[Definition]

typedef struct _ISP_AE_ROUTE_EX_NODE_S
{
  CVI_U32 u32IntTime;
  CVI_U32 u32Again;
  CVI_U32 u32Dgain;
  CVI_U32 u32IspDgain;
  ISP_IRIS_F_NO_E enIrisFNO;
  CVI_U32 u32IrisFNOLin;
} ISP_AE_ROUTE_EX_NODE_S;

[Members]

Member Name

Description

u32IntTime

nodeexposure time, in microseconds(us).

Value Range: (0x0, 0xFFFFFFFF]

u32Again

sensoranalog gain, 10bitprecision.

Value Range: [0x400, 0x3FFFFF]

u32Dgain

sensordigital gain, 10bitprecision.

Value Range: [0x400, 0x3FFFFF]

u32IspDgain

ISPdigital gain, 10bitprecision.

Value Range: [0x400, 0x40000]

enIrisFNO

nodeapertureFvalue largesmall, only supportsP-Iris, not supportedDC-Iris.

Value Range: [ISP_IRIS_F_NO_32_0, ISP_IRIS_F_NO_1_0]

u32IrisFNOLin

nodeapertureFvalueequivalentgainlargesmall, only supportsP-Iris, not supportedDC-Iris.

Value Range: [1, 1024]

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.2.17. ISP_AE_ROUTE_EX_S

[Description]

Define AEexposureallocation strategy extension attributes.

[Definition]

#define ISP_AE_ROUTE_EX_MAX_NODES (16)
typedef struct _ISP_AE_ROUTE_EX_S
{
  CVI_U32 u32TotalNum;
  ISP_AE_ROUTE_EX_NODE_S astRouteExNode[ISP_AE_ROUTE_EX_MAX_NODES];
} ISP_AE_ROUTE_EX_S;

[Members]

Member Name

Description

u32TotalNum

exposureextensionallocation routenodenumberpurpose, currentlymaximumis16.

astRouteExNode[ISP_AE_ROUTE_EX_MAX_NODES]

exposureextensionallocation routenodeattribute.

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.2.18. ISP_EXP_INFO_S

[Description]

Define ISPexposureinternalstatusinformation.

[Definition]

#define HIST_NUM (256)
typedef struct _ISP_EXP_INFO_S
{
  CVI_U32 u32ExpTime;
  CVI_U32 u32ShortExpTime;
  CVI_U32 u32MedianExpTime;
  CVI_U32 u32LongExpTime;
  CVI_U32 u32AGain;
  CVI_U32 u32DGain;
  CVI_U32 u32ISPDGain;
  CVI_U32 u32Exposure;
  CVI_BOOL bExposureIsMAX;
  CVI_S16 s16HistError;
  CVI_U32 au32AE_Hist256Value[HIST_NUM];
  CVI_U8 u8AveLum;
  CVI_U32 u32LinesPer500ms;
  CVI_U32 u32PirisFNO;
  CVI_U32 u32Fps;
  CVI_U32 u32ISO;
  CVI_U32 u32ISOCalibrate;
  CVI_U32 u32RefExpRatio;
  CVI_U32 u32FirstStableTime;
  ISP_AE_ROUTE_S stAERoute;
  ISP_AE_ROUTE_EX_S stAERouteEx;
  CVI_U8 u8WDRShortAveLuma;
  CVI_U32 u32WDRExpRatio;
  CVI_U8 u8LEFrameAvgLuma;
  CVI_U8 u8SEFrameAvgLuma;
  CVI_FLOAT fLightValue;
  CVI_U32 u32AGainSF;
  CVI_U32 u32DGainSF;
  CVI_U32 u32ISPDGainSF;
  CVI_U32 u32ISOSF;
  ISP_AE_ROUTE_S stAERouteSF;
  ISP_AE_ROUTE_EX_S stAERouteSFEx;
  CVI_BOOL bGainSepStatus;
}ISP_EXP_INFO_S;

[Members]

Member Name

Description

u32ExpTime

currentexposure time, in microseconds(us).

Value Range: [0x0, 0xFFFFFFFF]

u32ShortExpTime

FSW DRmodeunder, indicatescurrentshort frame(S)exposure time, in microseconds(us). linearmodenotuseconcernthevalue.

Value Range: [0x0, 0xFFFFFFFF]

u32LongExpTime

FSWDRmodeunder, table showcurrentlong frameexposure time, in microseconds(us).

Value Range: [0x0, 0xFFFFFFFF]

u32AGain

currentsensoranalog gain, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF]

u32DGain

currentsensordigital gain, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF]

u32ISPDGain

currentISPdigital gain, 10bitfractional precision.

Value Range: [0x400, 0xFFFFFFFF]

u32Exposure

currentexposureamount, etc.inexposure time andexposuregain product, whereexposure time unitisexposurelinenumber, exposuregainis6bitfractional precision.

Value Range: [0x40, 0xFFFFFFFF]

bExposureIsMAX

0: ISPnot yetreachtomaximumexposurehorizontal; 1: ISPreachtomaximumexposurehorizontal.

s16HistError

statistical information, AEtarget brightnessvalueandactualvalue difference, thevalueispositiveindicatescurrentexpected brightnessinformationlargeinactual brightnessinformation, thevalueisnegativeindicatesexpected brightnessinformationsmallinactual brightnessinformation.

au32AE_Hist256Value

global256segmenthistogramFigurestatistical information Value Range: [0x0, 0xFFFFFFFF]

u8AveLum

averagebrightnessinformationValue Range: [0x0, 0xFF]

u32LinesPer500ms

currenteach500mscorresponding exposurelinenumber, can useinwillexposure time unitbyusconversionbecomelinenumber.

Value Range: [0x0, 0xFFFFFFFF]

u32PirisFNO

currentP-IrisapertureFvaluecorresponding equivalentgain. Value Range: [0x0, 0x400]

u32Fps

actualimageframerate * 100

Value Range: : [0x0, 0xFFFFFFFF]

u32ISO

when beforesensoranalog gain*sensordigital gain*ISPdigital gain*100, wheregain precisionallis10bit.

Value Range: [0x64, 0xFFFFFFFF]

u32ISOCalibrate

standardISO, useincaptureDCFinformationdisplay. u32ISOCalibrate = u32ISO * 256 / u16ISOCalCoef.

u32RefExpRatio

Referenceexposureratio, useinestimatestatisticalcurrentscene dynamicrange, willbe affected bytoISP_WDR_EXPOSURE_ATTR_SinToleranceandSpeedetc.value affects.

Value Range: [0x40, 0x4000]

u32FirstStableTime

first timeAEconvergencestable wheninterval, in microseconds(us).

Value Range: [0x0, 0xFFFFFFFF]

stAERoute

actualtakes effect AE route, eachnodein exposure timeusingusas the unit, gainis10bitprecision, apertureThe value range is[ISP_IRIS_F_NO_32_0,ISP_IRIS_F_NO_1_0]. aperturetypeisDC-Iriswhen, nodeaperturevaluenotwillforexposureamountpartmatchproduceaffects.

stAERouteEx

actualtakes effect extensionAE route, eachnodein exposure timeusingusas the unit, gainis10bitprecision, apertureThe value range is[ISP_IRIS_F_NO_32_0, ISP_IRIS_F_NO_1_0]. aperturetypeisDC-Iriswhen, nodeaperturevaluenotwillforexposureamountpartmatchproduceaffects.

u32WDRExpRatio

WDR long/short exposure exposureratio, 6 bits precision

u8WDRShortAveLuma

short exposure imagebrightness

u8LEFrameAvgLuma

long exposure imageaveragebrightness

u8SEFrameAvgLuma

short exposure imageaveragebrightness

fLightValue

environmentbrightnessvalue

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.2.19. ISP_SMART_EXPOSURE_ATTR_S

[Description]

Define intelligentmodeunder AE exposure attributes.

[Definition]

typedef struct _ISP_SMART_EXPOSURE_ATTR_S
{
  CVI_BOOL bEnable;
  CVI_BOOL bIRMode;
  ISP_OP_TYPE_E enSmartExpType;
  CVI_U8 u8LumaTarget;
  CVI_U16 u16ExpCoef;
  CVI_U16 u16ExpCoefMax;
  CVI_U16 u16ExpCoefMin;
  CVI_U8 u8SmartInterval;
  CVI_U8 u8SmartSpeed;
  CVI_U16 u16SmartDelayNum;
  CVI_U8 u8Weight;
  CVI_U8 u8NarrowRatio;
} ISP_SMART_EXPOSURE_ATTR_S;

[Members]

Member Name

Description

bEnable

intelligent AE whetherEnable, DefaultCVI_FALSE.

bIRMode

whetherisredoutsidemode, DefaultCVI_FALSE. CVI_TRUE isredoutsidemode; . CVI_FALSE isnormalmode.

enSmartExpType

OP_TYPE_AUTO: according topurpose standarddetectionresultautomaticAdjustexposuresystemnumber; OP_TY PE_MANUAL: manualconfigurationexposuresystemnumber.

u8LumaTarget

recognitionregion(such asface)targetbrightnessValue Range: [0x0, 0xFF]

u16ExpCoef

baseinrawexposureAdjust exposuresystemnumber,

the larger the value, imageoverallbrightnessthe moreheight;

the smaller the value, imageoverallbrightnessthe morelow.

when enSmartExpType is OP_TYPE_AUTO when, u16ExpCoef is AEalgorithmaccording to targetdetectionresultcalculate exposuresystemnumber.

when enExpRatioType is OP_TYPE_MANUALwhen, u16ExpCoef ismanualconfiguration exposuresystemnumber.

10bit fractional precision, 0x400 indicatesexposuresystemnumberis1 x.

Value Range: [0x0, 0xFFFF]

u16ExpCoefMax

intelligentexposuresystemnumbermaximumvalue.

when enSmartExpType is OP_TYPE_AUTO when, u16ExpCoefMax indicatesintelligentexposuresystemnumbermaximumvalue.

whenenSmartExpType is OP_TYPE_MANUALwhen, u16ExpCoefMax invalid.

10bit fractional precision, 0x400indicatesexposuresystemnumbermaximumvalueis 1 x.

Value Range: [0x0, 0xFFFF]

u16ExpCoefMin

intelligentexposuresystemnumberminimumvalue.

when enSmartExpType is OP_TYPE_AUTO when, u16ExpCoefMin indicates. intelligentexposuresystemnumbermaximumvalue.

whenenSmartExpType is OP_TYPE_MANUALwhen, u16ExpCoefMin invalid.

10bit fractional precision, 0x400indicatesexposuresystemnumberminimumvalueis 1 x.

Value Range: [0x0, 0xFFFF]

u8SmartInterval

intelligent AE Runintervalinterval.

The value is 1 whenindicateseachframeRun,

The value is n when, indicateseach n frameRunonetime.

Value Range: [0x1, 0xFF]

u8SmartSpeed

intelligent AE Adjustspeed.

Default Value: is 0x40, the smaller the value, Adjust speedthe moreslow; the larger the value, Adjustspeedthe morefast, alsothe moreeasyoutputcurrentoscillation.

Value Range: [0x0, 0xFF]

u16SmartDelayNum

intelligentAEdelaywhenframenumber, The value is4whenindicates4frame not yetSetrecognitionregioninformation, cleardetectionregioninformationISP_SMART_INFO_S.

u8Weight

recognitionregionoperationweight, onlyintelligentmodetakes effect

Value Range: [0x0, 0x64]

u8NarrowRatio

recognitionregionvalidareareducesmallratioexample

Value Range: [0x0, 0x64]

[Precautions]

None.

[Related Data Types and Interfaces]

4.5.3. IRIS

4.5.3.1. ISP_IRIS_STATUS_E

[Description]

Define ISP aperturestatus.

[Definition]

typedef enum _ISP_IRIS_STATUS_E
{
    ISP_IRIS_KEEP = 0,
    ISP_IRIS_OPEN = 1,
    ISP_IRIS_CLOSE = 2,
    ISP_IRIS_BUTT
} ISP_IRIS_STATUS_E;

[Members]

Member Name

Description

ISP_IRIS_KEEP

aperturekeepcurrentstatus.

ISP_IRIS_OPEN

apertureallopen.

ISP_IRIS_CLOSE

apertureallclose.

[Precautions]

thevalueSetisISP_IRIS_OPENorISP_IRIS_CLOSEwhen, apertureprocessinallopenorallclose status, canuseinmeasuretestAIelectricalpathanddriverwhethercorrect. OPEN andCLOSE prioritylevelheightinAIEnableandmanual/automatic mode, AIalgorithmRunwhen, isguaranteeitscanenoughnormalworkoperation, needwillthevalueSetisISP_IRIS_KEEP.

[Related Data Types and Interfaces]

None.

4.5.3.2. ISP_IRIS_TYPE_E

[Description]

Define ISP aperturetype.

[Definition]

typedef enum _ISP_IRIS_TYPE_E
{
  ISP_IRIS_DC_TYPE = 0,
  ISP_IRIS_P_TYPE,
  ISP_IRIS_TYPE_BUTT,
} ISP_IRIS_TYPE_E;

[Members]

Member Name

Description

ISP_IRIS_DC_TYPE

DC-Irisaperture

ISP_IRIS_P_TYPE

P-Irisaperture

[Precautions]

  • mustSetcorrect aperturetype, AIalgorithmonly thencannormalworkoperation.

  • ifforconnect ismanualaperturelens, canwillthevalueSetisISP_IRIS_DC_TYPE, recommendedthiswhenDisableAIEnable.

[Related Data Types and Interfaces]

None.

4.5.3.3. ISP_IRIS_F_NO_E

[Description]

Define ISP apertureFvalue.

[Definition]

typedef enum _ISP_IRIS_F_NO_E
{
  ISP_IRIS_F_NO_32_0 = 0,ISP_IRIS_F_NO_22_0,ISP_IRIS_F_NO_16_0,ISP_IRIS_F_NO_11_0,ISP_IRIS_F_NO_8_0,ISP_IRIS_F_NO_5_6,ISP_IRIS_F_NO_4_0,ISP_IRIS_F_NO_2_8,ISP_IRIS_F_NO_2_0,ISP_IRIS_F_NO_1_4,ISP_IRIS_F_NO_1_0,ISP_IRIS_F_NO_BUTT,
} ISP_IRIS_F_NO_E;

[Members]

Member Name

Description

equivalentgain

ISP_IRIS_F_NO_32_0

apertureF32.0

1

ISP_IRIS_F_NO_22_0

apertureF22.0

2

ISP_IRIS_F_NO_16_0

apertureF16.0

4

ISP_IRIS_F_NO_11_0

apertureF11.0

8

ISP_IRIS_F_NO_8_0

apertureF8.0

16

ISP_IRIS_F_NO_5_6

apertureF5.6

32

ISP_IRIS_F_NO_4_0

apertureF4.0

64

ISP_IRIS_F_NO_2_8

apertureF2.8

128

ISP_IRIS_F_NO_2_0

apertureF2.0

256

ISP_IRIS_F_NO_1_4

apertureF1.4

512

ISP_IRIS_F_NO_1_0

apertureF1.0

1024

[Precautions]

  • forP-Iris, AE algorithmaccording toallocation routecalculateexposureamountwhen, apertureFvalueneedequivalentbecomeonegain, publicformsuch asunder: equivalentgainFNO = 1 << ISP_IRIS_F_NO_XX_XX. bythiscanknowF32.0 correspondinggain1, F22.0 correspondinggain2, F16.0 correspondinggain4, usingthistypepush, F1.0 correspondinggain1024.

[Related Data Types and Interfaces]

None.

4.5.3.4. ISP_MI_ATTR_S

[Description]

Manual Definitionapertureattribute.

[Definition]

typedef struct _ISP_MI_ATTR_S
{
  CVI_U32 u32HoldValue;
  ISP_IRIS_F_NO_E enIrisFNO;
} ISP_MI_ATTR_S;

[Members]

Member Name

Description

u32HoldValue

AIcorrectionvalue, useinDC-Iris Debug. The value range is[0x0, 0x3E8].

enIrisFNO

manualaperturelargesmall, according toapertureFvalueperformregionpart, only supportsP-Iris, notsupport maintainDC-Iris.

[Precautions]

  • forconnectDC-Irislenswhen, ifISP_IRIS_STATUS_E SetisISP_IRIS_KEEP, manualapertureEnable, u32HoldValuecanuseinDC-Iris Debug, thiswhenPWM duty cycleratiothat isisu32HoldValue.

  • forconnectP-Irislenswhen, ifISP_IRIS_STATUS_ESetisISP_IRIS_KEEP, manualapertureEnable, enIrisFNO canuseinP-Iris Debug, thiswhenwill ControlP-IrisstepelectricalmachinemovetoapertureFvalueandenIrisFNO mostclose to position. automaticexposuremodeunder, P-Irismanualaperturenottakes effect, thiswhenifneedfixedapertureisa certainFvalue, canwillenMaxIrisFNOTarget/ enMinIrisFNOTargetSetisrelativesamevaluetoimplement.

[Related Data Types and Interfaces]

None.

4.5.3.5. ISP_DCIRIS_ATTR_S

[Description]

Define DC-Iris AIalgorithmattribute.

[Definition]

typedef struct _ISP_DCIRIS_ATTR_S
{
  CVI_S32 s32Kp;
  CVI_S32 s32Ki;
  CVI_S32 s32Kd;
  CVI_U32 u32MinPwmDuty;
  CVI_U32 u32MaxPwmDuty;
  CVI_U32 u32OpenPwmDuty;
} ISP_DCIRIS_ATTR_S;

[Members]

Member Name

Description

s32Kp

ratioexamplegain, useinAdjustaperture openclosespeed, the larger this valueapertureopenopenandDisable speedthe morefast.

thevaluethroughsmalllightline changes sharplychangeconvergenceprocessineasyoutputcurrentoscillation, thevaluethroughlargeeasyoutputcurrentexceedadjust, alsowillcauseoscillation.

thevalue reasonableSetandelectricalroute characteristicsandlensrelated. recommendedvalueis7000.

The value range is[0, 100000].

s32Ki

accumulationpartgain, useinAdjustaperture openclosespeed, the larger this valueapertureopenopenandDisable speedthe morefast.

thevaluerelativelysmallwhen, collisiontostronglightconvergenceafterimagewillstableinoneratiorelativelylow brightnesson; thevaluerelativelylargewhencancanwillcausestronglightsceneaperturecannotDisable.

thevalue reasonableSetandelectricalroute characteristicsandlensrelated. recommendedvalueis100, thevalueGenerallynotneed tomodify.

The value range is[0, 1000].

s32Kd

slightpartgain, useinlimitlightline changes sharplychangewhenaperture openclosespeed,

the larger this valuelightline changes sharplychangewhenapertureopenopenandDisable speed the moreslow.

thevaluethroughlargeforinstantintervalchange brightnessthroughinsensitive, willcausescenebrightnessfastspeedchangewhenimageoutputcurrentoscillation.

thevalue reasonableSetandelectricalroute characteristicsandlensrelated. recommendedvalueis3000.

The value range is[0, 100000].

u32MinPwmDuty

minimumPWMduty cycleratio. thethe smaller the valuethroughexposurewhenapertureDisablespeedthe morefast, buteasycauseaperturetoreturnoscillation.

thevalue reasonableSetandelectricalroute characteristicsandlensrelated. recommendedvalueis250.

The value range is[0, 1000].

u32MaxPwmDuty

maximumP WMduty cycleratio. the larger this valueimageallblackwhenapertureopenopenspeedthe morefast,

thevaluethroughsmallthencancancauseexitapertureControlregionwhenaperturestillnot yetreachtomaximum, producebecomeimagenoisesevere.

thevalue reasonableSetandelectricalroute characteristicsandlensrelated. recommendedvalueis950.

The value range is[0, 1000].

u32OpenPwmDuty

apertureopenopenwhen PWMduty cycleratio.

whenimagebrightnessstableandandPWMduty cycleratiolargeinthevalueonesegmentwhenintervalafter, exitapertureControlregion domain.

theusingthevaluenotcantoosmall, whethertheneasycauseaperturenot yetreachtomaximumthenexitapertureControlregion, producebecomeimagenoisesevere.

thevalue reasonableSetandelectricalroute characteristicsandlensrelated. recommendedvalueis800.

The value range is[0, 1000].

[Precautions]

  • whenapertureDisableoutputcurrentoscillationwhen, GenerallymeansapertureDisablespeedtoofast, canthroughadaptwhenreducesmalls32Kpandincreaselargeu32MinPwmDutytosolve.

  • u32OpenPwmDuty valuerequireinu32MinPwmDutyandu32MaxPwmDutyofinterval, mustcorrectprotectthevaluecanwillaperturerelativelyfast openopen.

[Related Data Types and Interfaces]

4.5.3.6. ISP_PIRIS_ATTR_S

[Description]

Define P-Iris attribute.

[Definition]

None.

[Members]

Member Name

Description

None

None

[Precautions]

currentlyNot implemented yetsupport P- Iris

[Related Data Types and Interfaces]

None.

4.5.3.7. ISP_IRIS_ATTR_S

[Description]

Define ISP apertureattribute.

[Definition]

typedef struct _ISP_IRIS_ATTR_S {
  CVI_BOOL bEnable;
  ISP_OP_TYPE_E enOpType;
  ISP_IRIS_TYPE_E enIrisType;
  ISP_IRIS_STATUS_E enIrisStatus;
  ISP_MI_ATTR_S stMIAttr;
} ISP_IRIS_ATTR_S;

[Members]

Member Name

Description

bEnable

automaticapertureEnable.

enOpType

automaticapertureormanualaperturemodeselect.

enIrisType

aperturetype, DC-IrisorP-Iris.

enIrisStatus

aperturestatus.

stMIAttr

manualapertureattributeSetstructure.

[Precautions]

thevalueSetisISP_IRIS_OPENorISP_IRIS_CLOSEwhen, apertureprocessinallopenorallclose status, canuseinmeasuretestAIelectricalpathanddriverwhethercorrect. OPEN andCLOSE prioritylevelheightinAIEnableandmanual/automatic mode, AIalgorithmRunwhen, isguaranteeitscanenoughnormalworkoperation, needwillthevalueSetisISP_IRIS_KEEP.

[Related Data Types and Interfaces]