3. System Control

3.1. Functional Overview

System Controlpartcontain ISP public attributesconfiguration, Initialize ISP Firmware, Run ISP firmware, exit ISP firmware, Set ISP eachmoduleetc.function.

3.2. API Reference

thisdocumentationininterface, such asNonespecialdescription, not supportedmultipleenterprocess.

3.2.1. CVI_ISP_MemInit

[Description]

Initialize ISP externalregister.

[Syntax]

CVI_S32 CVI_ISP_MemInit(VI_PIPE ViPipe);

[Parameters]

Parameter Name

Description

ViPipe

ViPipe No.

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.so

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.2. CVI_ISP_Init

[Description]

Initialize ISP firmware.

[Syntax]

CVI_S32 CVI_ISP_Init(VI_PIPE ViPipe);

[Parameters]

Parameter Name

Description

ViPipe

ViPipe No.

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.3. CVI_ISP_Run

[Description]

Run ISP firmware.

[Syntax]

CVI_S32 CVI_ISP_Run(VI_PIPE ViPipe);

[Parameters]

Parameter Name

Description

ViPipe

ViPipe No.

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

None.

3.2.4. CVI_ISP_RunOnce

[Description]

Run ISP firmware onetime.

[Syntax]

CVI_S32 CVI_ISP_RunOnce(VI_PIPE ViPipe);

[Parameters]

Parameter Name

Description

ViPipe

ViPipe No.

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

None.

3.2.5. CVI_ISP_Exit

[Description]

exit ISP firmware.

[Syntax]

CVI_S32 CVI_ISP_Exit(VI_PIPE ViPipe);

[Parameters]

Parameter Name

Description

ViPipe

ViPipe No.

Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.6. CVI_ISP_SetPubAttr

[Description]

Set ISP public attributes.

[Syntax]

CVI_S32 CVI_ISP_SetPubAttr(VI_PIPE ViPipe, const ISP_PUB_ATTR_S *pstPubAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstPubAttr

ISP public attributes.

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.7. CVI_ISP_GetPubAttr

[Description]

Get ISP public attributes.

[Syntax]

CVI_S32 CVI_ISP_GetPubAttr(VI_PIPE ViPipe, ISP_PUB_ATTR_S  *pstPubAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstPubAttr

ISP public attributes.

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.8. CVI_ISP_SetFMWState

[Description]

Set ISP firmware status.

[Syntax]

CVI_S32 CVI_ISP_SetFMWState(VI_PIPE ViPipe, const ISP_FMW_STATE_E enState);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

enState

ISP firmware status.

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.9. CVI_ISP_GetFMWState

[Description]

Get ISP firmware status.

[Syntax]

CVI_S32 CVI_ISP_GetFMWState(VI_PIPE ViPipe, ISP_FMW_STATE_E *penState);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

enState

ISP firmware status.

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.10. CVI_ISP_SetModuleControl

[Description]

settings ISP functionmodule Control.

[Syntax]

CVI_S32 CVI_ISP_SetModuleControl(VI_PIPE ViPipe, const ISP_MODULE_CTRL_U *punModCtrl);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

punModCtrl

ISP functionmodule Control

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.11. CVI_ISP_GetModuleControl

[Description]

Get ISP functionmodule Control.

[Syntax]

CVI_S32 CVI_ISP_GetModuleControl(VI_PIPE ViPipe, ISP_MODULE_CTRL_U *punModCtrl);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

punModCtrl

ISP functionmodule Control.

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.12. CVI_ISP_GetVDTimeOut

[Description]

Get ISP interruptinformation.

[Syntax]

CVI_S32 CVI_ISP_GetVDTimeOut(VI_PIPE ViPipe, ISP_VD_TYPE_E_ enIspVDType, CVI_U32 u32MilliSec);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

enIspVDType

scenesynchronoussignalNo..

Input/Output

u32MilliSec

exceedwhenwheninterval, unit ms.

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

None.

3.2.13. CVI_ISP_SensorRegCallBack

[Description]

ISP provide sensor Register callback interface.

[Syntax]

CVI_S32 CVI_ISP_SensorRegCallBack(VI_PIPE ViPipe, ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, ISP_SENSOR_REGISTER_S *pstRegister);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstSnsAttrInfo

to ISP Register Sensor attribute

Input/Output

pstRegister

Sensor Registerstructure pointer

Input/Output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

_images/系统控制004.png

Figure 3.1 ISP libraryand sensor libraryinterval interface

[Example]

None.

[Related Topics]

3.2.14. CVI_ISP_SensorUnRegCallBack

[Description]

ISP provide sensor unregister callback interface.

[Syntax]

CVI_S32 CVI_ISP_SensorUnRegCallBack(VI_PIPE ViPipe, SENSOR_ID SensorId);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

SensorId

to ISP Register Sensor Id.

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.15. CVI_ISP_AELibRegCallBack

[Description]

ISP provide AE libraryRegister callback interface.

[Syntax]

CVI_S32 CVI_ISP_AELibRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ISP_AE_REGISTER_S *pstRegister);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAeLib

AE librarystructure pointer

Input

pstRegister

AE libraryRegisterstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

_images/image21.png

Figure 3.2 ISP libraryand AE libraryinterval interface

[Example]

None.

[Related Topics]

3.2.16. CVI_ISP_AELibUnRegCallBack

[Description]

ISP provide AE libraryunregister callback interface.

[Syntax]

CVI_S32 CVI_ISP_AELibUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAeLib

AE librarystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.17. CVI_ISP_AWBLibRegCallBack

[Description]

ISP provide AWB libraryRegister callback interface.

[Syntax]

CVI_S32 CVI_ISP_AWBLibRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, ISP_AWB_REGISTER_S *pstRegister);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAwbLib

AWB librarystructure pointer

Input

pstRegister

AWB libraryRegisterstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

_images/image31.png

Figure 3.3 ISP libraryand AWB libraryinterval interface

[Example]

None.

[Related Topics]

3.2.18. CVI_ISP_AWBLibUnRegCallBack

[Description]

ISP provide AWB libraryunregister callback interface.

[Syntax]

CVI_S32 CVI_ISP_AWBLibUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAwbLib

AWB librarystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.19. CVI_ISP_AFLibRegCallBack

[Description]

ISP provide AF libraryRegister callback interface.

[Syntax]

CVI_S32 CVI_ISP_AFLibRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAfLib, ISP_AF_REGISTER_S *pstRegister);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAfLib

AF librarystructure pointer

Input

pstRegister

AF libraryRegisterstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

_images/image21.png

Figure 3.4 ISP libraryand AF libraryinterval interface

[Example]

None.

[Related Topics]

3.2.20. CVI_ISP_AFLibUnRegCallBack

[Description]

ISP provide AF libraryunregister callback interface.

[Syntax]

CVI_S32 CVI_ISP_AFLibUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAfLib);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstAfLib

AF librarystructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.21. CVI_ISP_SetBindAttr

[Description]

Set ISP libraryand 3A library, sensor bindclosesystem.

[Syntax]

CVI_S32 CVI_ISP_SetBindAttr(VI_PIPE ViPipe, const ISP_BIND_ATTR_S *pstBindAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstBindAttr

bindstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.22. CVI_ISP_GetBindAttr

[Description]

Get ISP libraryand 3A library, sensor bindclosesystem.

[Syntax]

CVI_S32 CVI_ISP_GetBindAttr(VI_PIPE ViPipe, ISP_BIND_ATTR_S *pstBindAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstBindAttr

bindstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

  • This interface does not support multiprocess operation.

  • This interface is not currently supported on the dual-system SDK linux side.

[Example]

None.

[Related Topics]

3.2.23. CVI_ISP_SetCtrlParam

[Description]

Set ISP Controlparameternumber.

[Syntax]

CVI_S32 CVI_ISP_SetCtrlParam(VI_PIPE ViPipe, const ISP_CTRL_PARAM_S *pstIspCtrlParam);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIspCtrlParam

ISP Controlparameternumberstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.24. CVI_ISP_GetCtrlParam

[Description]

Get ISP Controlparameternumber.

[Syntax]

CVI_S32 CVI_ISP_GetCtrlParam(VI_PIPE ViPipe, ISP_CTRL_PARAM_S *pstIspCtrlParam);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ViPipe No.

Input

pstIspCtrlParam

ISP Controlparameternumberstructure pointer.

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.25. CVI_ISP_SetModParam

[Description]

Set ISP moduleparameternumber.

[Syntax]

CVI_S32 CVI_ISP_SetModParam(const ISP_MOD_PARAM_S *pstModParam);

[Parameters]

Parameter Name

Description

Input/Output

pstIspModParam

ISP moduleparameternumberstructure pointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.26. CVI_ISP_GetModParam

[Description]

Get ISP moduleparameternumber.

[Syntax]

CVI_S32 CVI_ISP_GetModParam( ISP_MOD_PARAM_S *pstModParam);

[Parameters]

Parameter Name

Description

Input/Output

pstIspCtrlParam

ISP moduleparameternumberstructure pointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.27. CVI_BIN_SetBinName

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.28. CVI_BIN_GetBinName

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.29. CVI_BIN_GetBinExtraAttr

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.30. CVI_BIN_GetBinTotalLen

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.31. CVI_BIN_ExportBinData

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.32. CVI_BIN_ImportBinData

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.33. CVI_BIN_SaveParamToBin

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.34. CVI_BIN_LoadParamFromBin

[Description]

See the documentation for details" Image Quality Debugging Tool User Guide " 4.1.2chaptersection.

3.2.35. CVI_ISP_IrAutoRunOnce

[Description]

Runredoutsideautomaticswitchfunction.

[Syntax]

CVI_S32 CVI_ISP_IrAutoRunOnce(ISP_DEV IspDev, ISP_IR_AUTO_ATTR_S *pstIrAttr);

[Parameters]

Parameter Name

Description

Input/Output

IspDev

ISP deviceNo.

Input

pstIrAttr

redoutsideautomaticswitchattribute

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_comm_isp.h, cvi_isp.h

  • Library File: libisp.so

[Note]

None.

[Example]

ISP_DEV  IspDev = 0;
ISP_IR_AUTO_ATTR_S   stIrAttr;

stIrAttr.bEnable = 1;
stIrAttr.u32Normal2IrIsoThr = 3200;
stIrAttr.u32Ir2NormalIsoThr = 100;
stIrAttr.u32RGMin = 256;
stIrAttr.u32RGMax = 512;
stIrAttr.u32BGMin = 256;
stIrAttr.u32BGMax = 512;
CVI_ISP_IrAutoRunOnce(IspDev, &stIrAttr);

[Related Topics]

None.

3.2.36. CVI_ISP_SetSmartInfo

[Description]

SetAIidentifyoutput (face, human shape, object) coordinatesgive AE performmeasurelight.

[Syntax]

CVI_S32 CVI_ISP_SetSmartInfo(VI_PIPE ViPipe, const ISP_SMART_INFO_S *pstSmartInfo, CVI_U8 TimeOut);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ISP deviceNo.

Input

pstSmartInfo

AE AIrecognitioncoordinatesinformationstructurepointer

Input

TimeOut

recognitioncoordinatesinformationnot yetmorenewframenumber, exceedthroughafterrestorenormalAEmode

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]

//设定人脸在 raw domain坐标位置 (X, Y , W, H) =(0, 0, 100, 100)
//及 frame 的宽/高 1920/1080信息給 AE
//4帧未更新识别结果后恢复正常AE
VI_PIPE ViPipe = 0;
ISP_SMART_INFO_S stSmartInfo;

CVI_ISP_GetSmartInfo(ViPipe, &stSmartInfo);
stSmartInfo.stROI[0].bEnable = 1;
stSmartInfo.stROI[0].bAvailable = 1;
stSmartInfo.stROI[0].u8Num = 1;
stSmartInfo.stROI[0].u16PosX[0] = 0;
stSmartInfo.stROI[0].u16PosY[0] = 0;
stSmartInfo.stROI[0].u16Width[0] = 100;
stSmartInfo.stROI[0].u16Height[0] = 100;
stSmartInfo.stROI[0].u16FrameWidth = 1920;
stSmartInfo.stROI[0].u16FrameHeight = 1080;
CVI_ISP_SetSmartInfo(ViPipe, &stSmartInfo, 4);

[Related Topics]

3.2.37. CVI_ISP_GetSmartInfo

[Description]

GetAIidentifyoutput (face, human shape, object) coordinates.

[Syntax]

CVI_S32 CVI_ISP_GetSmartInfo(VI_PIPE ViPipe, ISP_SMART_INFO_S *pstSmartInfo);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ISP deviceNo.

Input

pstSmartInfo

AE AIrecognitioncoordinatesinformationstructurepointer

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]

3.2.38. CVI_ISP_SetStitchAttr

[Description]

SetISPstitching channelinformation, need togroupcombinesystemstatisticalvalueinformationandcalibrationinformation.

[Syntax]

CVI_S32 CVI_ISP_SetStitchAttr(VI_PIPE ViPipe, ISP_STITCH_ATTR_S *pstStitchAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ISP deviceNo.

Input

pstStitchAttr

ISP stitchinginformationstructurepointer

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.39. CVI_ISP_GetStitchAttr

[Description]

GetISPstitching channelinformation, need togroupcombinesystemstatisticalvalueinformationandcalibrationinformation.

[Syntax]

CVI_S32 CVI_ISP_GetStitchAttr(VI_PIPE ViPipe, ISP_STITCH_ATTR_S *pstStitchAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ISP deviceNo.

Input

pstStitchAttr

ISP stitchinginformationstructurepointer

output

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.2.40. CVI_ISP_StitchCalibartion

[Description]

calibrationGetrelativesamestitchinggroupeachchannel sensor andlensdifferenceratioexample

[Syntax]

CVI_S32 CVI_ISP_StitchCalibartion(VI_PIPE ViPipe, ISP_STITCH_ATTR_S *pstAttr, CVI_U8 chnNum);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

ISP deviceNo.

Input

pstAttr

ISP stitchinginformationstructurepointer

Input&output

chnNum

ISP stitchingcalibration channeltotalnumber

Input

[Return Value]

Return Value

Description

0

Success.

Non-zero

Failure, See Error Code.

[Requirements]

  • Header File: cvi_isp.h

  • Library File: libisp.a

[Note]

None.

[Example]

None.

[Related Topics]

3.3. Data Types

thisdocumentationinchangeamount, such asnot yetclearcorrectindicatesetValue Range, thenDefaultisData Typescorresponding Value Range. For exampleCVI_U8 Data Types changeamountThe value range is[0, 255]. thisdocumentationinchangeamount, such asnot yetclearcorrectindicatesetnumberdataprecision, thenDefaultis 1.

3.3.1. RECT_S

[Description]

Define cropwindowstart positionandimagewidthheight

[Definition]

xxx

[Members]

Member Name

Description

s32X

horizontaldirectionstart position

s32Y

verticalhistogramtostart position

u32Width

imagewidth

u32Height

imageheight

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.2. SIZE_S

[Description]

Define sensor output widthheight.

[Definition]

typedef struct _SIZE_S {
  CVI_U32 u32Width;
  CVI_U32 u32Height;
} SIZE_S;

[Members]

Member Name

Description

u32Width

Sensor outputwidth

u32Height

Sensor outputheight

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.3. ISP_BAYER_FORMAT_E

[Description]

Define InputISPimage Bayermatrixcolumn formattype

[Definition]

typedef enum _ISP_BAYER_FORMAT_E {
  BAYER_BGGR,
  BAYER_GBRG,
  BAYER_GRBG,
  BAYER_RGGB,
  //for RGBIR sensor
  BAYER_GRGBI = 8,
  BAYER_RGBGI,
  BAYER_GBGRI,
  BAYER_BGRGI,
  BAYER_IGRGB,
  BAYER_IRGBG,
  BAYER_IBGRG,
  BAYER_IGBGR,
  BAYER_BUTT
} ISP_BAYER_FORMAT_E;

[Members]

Member Name

Description

BAYER_XX

eachkindbayermatrixcolumn formattype, namestandardshowpixelusingwhatkindmethodarrangecolumn

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.4. WDR_MODE_E

[Description]

Define InputISPRunwhensensor Runmethod,

[Definition]

typedef enum _WDR_MODE_E {
  WDR_MODE_NONE = 0,
  WDR_MODE_BUILT_IN,
  WDR_MODE_QUDRA,

  WDR_MODE_2To1_LINE,
  WDR_MODE_2To1_FRAME,
  WDR_MODE_2To1_FRAME_FULL_RATE,

  WDR_MODE_3To1_LINE,
  WDR_MODE_3To1_FRAME,
  WDR_MODE_3To1_FRAME_FULL_RATE,
  WDR_MODE_4To1_LINE,
  WDR_MODE_4To1_FRAME,
  WDR_MODE_4To1_FRAME_FULL_RATE,

  WDR_MODE_MAX,
} WDR_MODE_E;

[Members]

Member Name

Description

WDR_MODE_NONE

linearmode.

WDR_MODE_BUILT_IN

Sensor synthesis WDR mode.

WDR_MODE_QUDRA

Qudra mode

WDR_MODE_2To1_LINE

2 framesynthesisline WDR mode.

WDR_MODE_2To1_FRAME

2 framesynthesisframe WDR mode.

WDR_MODE_2To1_FRAME_FULL_RATE

2 framesynthesisframe WDR allframeratemode.

WDR_MODE_3To1_LINE

3 framesynthesisline WDR mode.

WDR_MODE_3To1_FRAME

3 framesynthesisframe WDR mode.

WDR_MODE_3To1_FRAME_FULL_RATE

3 framesynthesisframe WDR allframeratemode.

WDR_MODE_4To1_LINE

4 framesynthesisline WDR mode.

WDR_MODE_4To1_FRAME

4 framesynthesisframe WDR mode.

WDR_MODE_4To1_FRAME_FULL_RATE

4 framesynthesisframe WDR allframeratemode.

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.5. ISP_PUB_ATTR_S

[Description]

Define ISP public attributes

[Definition]

typedef struct _ISP_PUB_ATTR_S {
  RECT_S stWndRect;
  SIZE_S stSnsSize;
  CVI_FLOAT f32FrameRate;
  ISP_BAYER_FORMAT_E enBayer;
  WDR_MODE_E enWDRMode;
  CVI_U8 u8SnsMode;
} ISP_PUB_ATTR_S;

[Members]

Member Name

Description

stWndRect

ISPoutput rect

stSnsSize

Sensor image size

f32FrameRate

Sensor framerate

enBayer

Sensor Bayerformat

enWDRMode

widthdynamicmode

u8SnsMode

useinperform SensorInitializeordercolumn select, inpartidentifyrateandframeraterelativeat the same time, configurationdifferent u8SnsModecorrespondingdifferent Initializeordercolumn;

othercase, u8SnsMode Defaultconfigurationis0,

canthrough stSnsSize and f32FrameRate performInitializeordercolumn select.

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.6. ISP_FMW_STATE_E

[Description]

Define ISP firmware status.

[Definition]

typedef enum _ISP_FMW_STATE_E {
  ISP_FMW_STATE_RUN,
  ISP_FMW_STATE_FREEZE,
  ISP_FMW_STATE_BUTT
} ISP_FMW_STATE_E;

[Members]

Member Name

Description

ISP_FMW_STATE_RUN

FirmwarenormalRunstatus

ISP_FMW_STATE_FREEZE

Firmware frozenstatus

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.7. ISP_MODULE_CTRL_U

[Description]

Define ISP functionmodule Control.

[Definition]

typedef union _ISP_MODULE_CTRL_U {
  CVI_U64 u64Key;
  struct {
    CVI_U64 bitBypassBlc : 1; /* RW;[0] */
    CVI_U64 bitBypassRlsc : 1; /* RW;[1] */
    CVI_U64 bitBypassFpn : 1; /* RW;[2] */
    CVI_U64 bitBypassDpc : 1; /* RW;[3] */
    CVI_U64 bitBypassCrosstalk : 1; /* RW;[4] */
    CVI_U64 bitBypassWBGain : 1; /* RW;[5] */
    CVI_U64 bitBypassDis : 1; /* RW;[6] */
    CVI_U64 bitBypassBnr : 1; /* RW;[7] */
    CVI_U64 bitBypassDemosaic : 1; /* RW;[8] */
    CVI_U64 bitBypassRbgcac : 1; /* RW;[9] */
    CVI_U64 bitBypassMlsc : 1; /* RW;[10] */
    CVI_U64 bitBypassCcm : 1; /* RW;[11] */
    CVI_U64 bitBypassFusion : 1; /* RW;[12] */
    CVI_U64 bitBypassDrc : 1; /* RW;[13] */
    CVI_U64 bitBypassGamma : 1; /* RW;[14] */
    CVI_U64 bitBypassDehaze : 1; /* RW;[15] */
    CVI_U64 bitBypassClut : 1; /* RW;[16] */
    CVI_U64 bitBypassCsc : 1; /* RW;[17] */
    CVI_U64 bitBypassDci : 1; /* RW;[18] */
    CVI_U64 bitBypassCa : 1; /* RW;[19] */
    CVI_U64 bitBypassPreyee : 1; /* RW;[20] */
    CVI_U64 bitBypassMotion : 1; /* RW;[21] */
    CVI_U64 bitBypass3dnr : 1; /* RW;[22] */
    CVI_U64 bitBypassYnr : 1; /* RW;[23] */
    CVI_U64 bitBypassCnr : 1; /* RW;[24] */
    CVI_U64 bitBypassCac : 1;  /*RW:[25]*/
    CVI_U64 bitBypassCa2 : 1;  /*RW:[26]*/
    CVI_U64 bitBypassYee : 1;  /*RW:[27]*/
    CVI_U64 bitBypassYcontrast : 1;  /*RW:[28]*/
    CVI_U64 bitBypassMono : 1;  /*RW:[29]*/
    CVI_U64 bitRsv : 34; /* H  ; [30:63] */
  };
} ISP_MODULE_CTRL_U;

[Members]

Member Name

Description

u64Key

structureenumeration wholeshapevalue

bitBypassXXX

eachmodulefunctionControlbit

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.8. ISP_VD_TYPE_E

[Description]

Define andISP synchronousmessageNo.

[Definition]

typedef enum _ISP_VD_TYPE_E {
  ISP_VD_FE_START = 0,
  ISP_VD_FE_END,
  ISP_VD_BE_END,
  ISP_VD_MAX
} ISP_VD_TYPE_E;

[Members]

Member Name

Description

ISP_VD_FE_START

FE frame startmessageNo.

ISP_VD_FE_END

FE frame endmessageNo.

ISP_VD_BE_END

BE frame endmessageNo.

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.9. ISP_SNS_ATTR_INFO_S

[Description]

Define ISP sensor attribute.

[Definition]

typedef struct _ISP_SNS_ATTR_INFO_S {
  CVI_U32 eSensorId;
} ISP_SNS_ATTR_INFO_S;

[Members]

Member Name

Description

eSensorId

Sensor ID No..

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.10. ISP_CMOS_SENSOR_IMAGE_MODE_S

[Description]

Define ISP sensor imagemodeinformationattribute.

[Definition]

typedef struct _ISP_CMOS_SENSOR_IMAGE_MODE_S {

  CVI_U16 u16Width;

  CVI_U16 u16Height;

  CVI_FLOAT f32Fps;

  CVI_U8 u8SnsMode;

  CVI_U8 u8LaneNum;

  CVI_U8 u8EnableMaster;

} ISP_CMOS_SENSOR_IMAGE_MODE_S;

[Members]

Member Name

Description

u16Width

imagewidth

u16Height

imageheight

f32Fps

framerate

u8SnsMode

passsensedeviceworkoperationmode

u8LaneNum

MIPI channelnumber

u8EnableMaster

mainfromEnableflag

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.11. ISP_CMOS_BLACK_LEVEL_S

[Description]

Define ISP sensor blackelectricalflatinformationattribute.

[Definition]

typedef struct _ISP_CMOS_BLACK_LEVEL_S {

  CVI_BOOL bUpdate;

  ISP_BLACK_LEVEL_ATTR_S blcAttr;

} ISP_CMOS_BLACK_LEVEL_S;

[Members]

Member Name

Description

bUpdate

morenewflag

blcAttr

blackelectricalflatattribute

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.12. ISP_CMOS_DEFAULT_S

[Description]

Define ISP sensor Defaultnoisecalibrateattribute.

[Definition]

typedef struct _ISP_CMOS_DEFAULT_S {

  ISP_CMOS_NOISE_CALIBRATION_S stNoiseCalibration;

} ISP_CMOS_DEFAULT_S;

[Members]

Member Name

Description

stNoiseCalibration

noisecalibrateconfiguration

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.13. ALG_LIB_S

[Description]

theuselibrary information.

[Definition]

typedef struct _ALG_LIB_S {
  CVI_S32 s32Id;
  CVI_CHAR acLibName[ALG_LIB_NAME_SIZE_MAX];
} ALG_LIB_S;

[Members]

Member Name

Description

s32Id

algorithm libraryactualexample Id.

acLibName

standardidentifyalgorithm libraryname charactersymbolarray.

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.14. ISP_AE_REGISTER_S

[Description]

ISP provide AE libraryRegister callback interface.

[Definition]

typedef struct _ISP_AE_REGISTER_S {
  ISP_AE_EXP_FUNC_S stAeExpFunc;
} ISP_AE_REGISTER_S;

[Members]

Member Name

Description

stAeExpFunc

AE Register callback functionstructure.

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.15. ISP_AE_EXP_FUNC_S

[Description]

Define AE callback functionstructure.

[Definition]

typedef struct _ISP_AE_EXP_FUNC_S {
  CVI_S32 (*pfn_ae_init)(VI_PIPE ViPipe, const ISP_AE_PARAM_S *pstAeParam);
  CVI_S32 (*pfn_ae_run)(VI_PIPE ViPipe, const ISP_AE_INFO_S *pstAeInfo, ISP_AE_RESULT_S *pstAeResult, CVI_S32 s32Rsv);
  CVI_S32 (*pfn_ae_ctrl)(VI_PIPE ViPipe, CVI_U32 u32Cmd, void *pValue);
  CVI_S32 (*pfn_ae_exit)(VI_PIPE ViPipe);
} ISP_AE_EXP_FUNC_S;

[Members]

Member Name

Description

pfn_ae_init

Initialize AE callback function pointer.

pfn_ae_run

Run AE callback function pointer.

pfn_ae_ctrl

Control AE internalstatus callback function pointer.

pfn_ae_exit

destroy AE callback function pointer.

[Precautions]

  • call CVI_ISP_Init whenwillcallpfn_ae_initcallback function, usingInitializeAEalgorithm library.

  • call CVI_ISP_Run whenwillcallpfn_ae_runcallback function, usingRunAEalgorithm library, calculateobtaintosensor exposure timeandgain, ISP digital gain.

  • call CVI_ISP_Exit whenwillcallpfn_ae_exitcallback function, usingdestroyAEalgorithm library.

[Related Data Types and Interfaces]

3.3.16. ISP_AE_PARAM_S

[Description]

Define ISP providegiveAE Initializeparameternumberstructure.

[Definition]

typedef struct _ISP_AE_PARAM_S{
  SENSOR_ID SensorId;
  CVI_U8 u8WDRMode;
  CVI_U8 u8HDRMode;
  CVI_U16 u16BlackLevel;
  CVI_FLOAT f32Fps;
  ISP_BAYER_FORMAT_E enBayer;
  ISP_STITCH_ATTR_S stStitchAttr;
  CVI_S32 s32Rsv;
  ISP_3AWIN_CONFIG_S aeLEWinConfig[AE_MAX_NUM];
  ISP_3AWIN_CONFIG_S aeSEWinConfig;
}  ISP_AE_PARAM_S;

[Members]

Member Name

Description

SensorId

theRegister Sensor id.

u8WDRMode

widthdynamicmode, ISPtoAEprovidewidthdynamicmodeinformation.

u8HDRMode

HDRmode, ISP toAE provideHDRmodeinformation.

u16BlackLevel

blackelectricalflatvalue, 12bitprecision, ISP toAE provideblackelectricalflatinformation.

f32Fps

framerate, ISP toAEprovideframerateinformation.

enBayer

Sensor Bayer Pat tern, includeRGGB, GRBG, GBRG, BGGRfourkindformat.

stStitchAttr

stitchingmode, ISPtoAEprovidestitchingmodeinformation.

aeLEWinConfig

ISP toAE provideWDRlong exposure window configurationinformation.

aeSEWinConfig

ISP toAE provideWDRshort exposure window configurationinformation.

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.17. ISP_SMART_INFO_S

[Description]

Define ISP providegiveAE statistical informationstructure.

[Definition]

typedef struct _ISP_SMART_INFO_S
{
  ISP_SMART_ROI_S stROI[SMART_CLASS_MAX];
} ISP_SMART_INFO_S;

[Members]

Member Name

Description

stROI

facerecognitionorhuman shapedetectionregioninformation

[Precautions]

  • currentonly supportsfacemodelandhuman shapemodeldetectionresult, stROIunderstandardis0whenisfacedetectionresult, understandardis1whenishuman shapedetectionresult

  • AE willaccording toprovide facein raw positiontofindoutputfaceposition AE window , andusethis AE window brightnesstoexecuteline face AE measurelightstrategy

[Related Data Types and Interfaces]

None.

3.3.18. ISP_AE_INFO_S

[Description]

Define ISPprovidegiveAE statistical informationstructure.

[Definition]

typedef struct _ISP_AE_INFO_S {
  CVI_U32 u32FrameCnt;
  ISP_SMART_ROI_S  stSmartInfo;
  ISP_FE_AE_STAT_1_S *pstFEAeStat1[AE_MAX_NUM];
  ISP_FE_AE_STAT_2_S *pstFEAeStat2[AE_MAX_NUM];
  ISP_FE_AE_STAT_3_S *pstFEAeStat3[AE_MAX_NUM];
  ISP_FE_AE_STITCH_STAT_3_S *pstFEAeStiStat;
  ISP_BE_AE_STAT_1_S *pstBEAeStat1;
  ISP_BE_AE_STAT_2_S *pstBEAeStat2;
  ISP_BE_AE_STAT_3_S *pstBEAeStat3;
  ISP_BE_AE_STITCH_STAT_3_S *pstBEAeStiStat;
  ISP_3AWIN_CONFIG_S aeLEWinConfig[AE_MAX_NUM];
  ISP_3AWIN_CONFIG_S aeSEWinConfig;
} ISP_AE_INFO_S;

[Members]

Member Name

subMember Name

Description

u32FrameCnt

frame accumulateaddstatisticalnumber

stSmartInfo

pleaseReferenceISP_SMART_INFO_S interfacedescription

pstFEAeStat1

u32PixelCount

systemstatistical pixelpointtotalnumber.

u32PixelWeight

systemstatistical bandweightpixelpointtotalnumber.

au3 2HistogramMemArray

256-bin histogram statistical information array

pstFEAeStat2

u16GlobalAvgR

globalR componentaveragevalue

u16GlobalAvgGr

globalGrcomponentaveragevalue

u16GlobalAvgGb

globalGbcomponentaveragevalue

u16GlobalAvgB

globalB componentaveragevalue

pstFEAeStat3

au16ZoneAvg

partregionintervalR, Gr, Gb, Bcomponentaveragevalue

pstFEAeStiStat

au16ZoneAvg

stitchingmodeunderstitchingafterpartregionintervalR, Gr, Gb, Bcomponentaveragevalue

pstBEAeStat1

bStable

Currently unused

pstBEAeStat2

bStable

Currently unused

pstBEAeStat3

bStable

Currently unused

pstBEAeStiStat

bStable

Currently unused

aeLEWinConfig

winWidth

AE window width

winHeight

AE window height

winXOffset

AE window start positionhorizontaldirectionbiasmovevalue

winYOffset

AE window start positionverticalhistogramtobiasmovevalue

winXNum

AE horizontal direction window number

winYNum

AE vertical direction window number

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.19. ISP_AE_RESULT_S

[Description]

Define AE libraryReturngiveISP configurationregisterstructure.

[Definition]

typedef struct _ISP_AE_STAT_RESULT_S {
  CVI_U32 u32IntTime[VI_MAX_PIPE_NUM];
  CVI_U32 u32IspDgain;
  CVI_U32 u32Again;
  CVI_U32 u32Dgain;
  CVI_U32 u32Iso;
  CVI_U8 u8AERunInterval;
  CVI_BOOL bPirisValid;
  CVI_S32 s32PirisPos;
  CVI_U32 u32PirisGain;
  ISP_FSWDR_MODE_E enFSWDRMode;
  CVI_U32 au32WDRGain[4];
  CVI_U32 u32HmaxTimes;
  ISP_AE_STAT_ATTR_S stStatAttr;
  ISP_DCF_UPDATE_INFO_S stUpdateInfo;
  CVI_U32 u32ExpRatio;
  CVI_S16 s16CurrentLV;
  CVI_U32 u32AvgLuma;
  CVI_U8 u8MeterFramePeriod;
  CVI_BOOL bStable;
  CVI_FLOAT fBvStep;
  CVI_U32 u32BlcIso;
  CVI_U32 u32IspDgainSF;
  CVI_U32 u32AgainSF;
  CVI_U32 u32DgainSF;
  CVI_U32 u32IsoSF;
  CVI_U32 u32BlcIsoSF;
  CVI_FLOAT fEvRatio[2];
} ISP_AE_RESULT_S;

[Members]

Member Name

Description

u32IntTime

exposure time

u32IspDgain

ISP digital gain, 10 bit precision

u32Again

Sensor analog gain, 10 bit precision

u32Dgain

Sensor digital gain, 10 bit precision

u32Iso

AE totalgainvalue , 2 xwhenis100 * 2 =200

u8AERunInterval

AEalgorithmRun intervalinterval

bPirisValid

Piriswhethervalid flag

s32PirisPos

Piris stepelectricalmachine position, Value RangeandspecificPiris lensrelated

u32PirisGain

Piris apertureequivalentincrease benefit, Value RangeandspecificPirislensrelated

enFSWDRMode

WDR synthesismode.

0 indicatesnormal multi-frame synthesis WDR mode;

1 indicateslong-frame mode;

2 indicatesautomatic long-frame mode.

au32WDRGain

compatibleparameternumber, Currently unused

u32HmaxTimes

Se nsorcorrespondingreadoutputoneline wheninterval, unit: ns

stStatAttr

compatibleparameternumber, Currently unused

stUpdateInfo

useinpasspassAE relatedDCFinformation

u32ExpRatio

WDR modewhen, long/short exposure exposureratiovalue, 64 is 1x

s16CurrentLV

AE currentlyestimatecalculate environmentbrightness, numberthe larger the valueindicatesenvironmentthe morebright

u32AvgLuma

currentlyimage brightness

u8MeterFramePeriod

AE exposuretakes effectperiod

bStable

current AE convergencestatuswhetherstable

fBvStep

currentlyimage brightnessdistancetargetbrightness step

u32BlcIso

long exposurecorresponding BLCReference totalgainvalue,thisgainonlycontainsensor simulation/digital gain, notcontainISPdigital gain

u32IspDgainSF

WDR mode, short exposureISP digital gain, 10 bit precision

u32AgainSF

WDR mode, short exposureSensor analog gain, 10 bit precision

u32DgainSF

WDR mode, short exposureSensor digital gain, 10 bit precision

u32IsoSF

WDR mode, AE totalgainvalue

u32BlcIsoSF

shortexposure BLC Reference totalgainvalue,thisgainonlycontainsensor simulation/digital gain, notcontainISPdigital gain

fEvRatio

AE currentdetectandbeforeonedetect exposuredifferenceratiorate

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.20. ISP_SENSOR_EXP_FUNC_S

[Description]

Define sensor callback functionstructure.

[Definition]

typedef struct _ISP_SENSOR_EXP_FUNC_S {
  CVI_VOID (*pfn_cmos_sensor_init)(VI_PIPE ViPipe);
  CVI_VOID (*pfn_cmos_sensor_exit)(VI_PIPE ViPipe);
  CVI_VOID (*pfn_cmos_sensor_global_init)(VI_PIPE ViPipe);
  CVI_S32 (*pfn_cmos_set_image_mode)(VI_PIPE ViPipe, ISP_CMOS_SENSOR_IMAGE_MODE_S *pstSensorImageMode);
  CVI_S32 (*pfn_cmos_set_wdr_mode)(VI_PIPE ViPipe, CVI_U8 u8Mode);

  /* the algs get data which is associated with sensor, except 3a */
  CVI_S32 (*pfn_cmos_get_isp_default)(VI_PIPE ViPipe, ISP_CMOS_DEFAULT_S *pstDef);
  CVI_S32 (*pfn_cmos_get_isp_black_level)(VI_PIPE ViPipe, ISP_CMOS_BLACK_LEVEL_S *pstBlackLevel);
  CVI_S32 (*pfn_cmos_get_sns_reg_info)(VI_PIPE ViPipe, ISP_SNS_SYNC_INFO_S *pstSnsRegsInfo);

  /* the function of sensor set pixel detect */
//CVI_VOID (*pfn_cmos_set_pixel_detect)(VI_PIPE ViPipe, bool bEnable);
} ISP_SENSOR_EXP_FUNC_S;

[Members]

Member Name

Description

pfn_cmos_sensor_init

Initialize sensor callback function pointer.

pfn_cmos_sensor_exit

sensor callbackexitfunctionpointer.

pfn_cmos_sensor_global_init

Initializeglobalchangeamount callback function pointer.

pfn_cmos_set_image_mode

Setpartidentifyrateandframerateswitch callback function pointer.

pfn_cmos_set_wdr_mode

Set wdrmode callback function pointer.

pfn_cmos_get_isp_default

Get ISP basicalgorithm initialvalue callback function pointer.

pfn_cmos_get_isp_black_level

Get sensor blackelectricalflatvalue callback function pointer, supportaccording tosensor gaindynamicAdjustblackelectricalflatvalue

pfn_cmos_get_sns_reg_info

Get sensor registerinformation callback function pointer, useinimplementinsidekernelstateconfiguration AE information

pfn_cmos_set_pixel_detect

Setdefectivepointcorrectionopenclose callback function pointer

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.21. ISP_SENSOR_REGISTER_S

[Description]

ISP provide sensor Register callback interface.

[Definition]

typedef struct bmISP_SENSOR_REGISTER_S {
  ISP_SENSOR_EXP_FUNC_S stSnsExp;
} ISP_SENSOR_REGISTER_S;

[Members]

Member Name

Description

stSnsExp

Sensor Register callback functionstructure.

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.22. ISP_AWB_EXP_FUNC_S

[Description]

Define AWB callback functionstructure.

[Definition]

typedef struct _ISP_AWB_EXP_FUNC_S {
  CVI_S32 (*pfn_awb_init)(VI_PIPE ViPipe, const ISP_AWB_PARAM_S *pstAwbParam);
  CVI_S32 (*pfn_awb_run)(VI_PIPE ViPipe, const ISP_AWB_INFO_S *pstAwbInfo, ISP_AWB_RESULT_S *pstAwbResult,CVI_S32 s32Rsv);
  CVI_S32 (*pfn_awb_ctrl)(VI_PIPE ViPipe, CVI_U32 u32Cmd, CVI_VOID * pValue);
  CVI_S32 (*pfn_awb_exit)(VI_PIPE ViPipe);
} ISP_AWB_EXP_FUNC_S;

[Members]

Member Name

Description

pfn_awb_init

Initialize AWB callback function pointer

pfn_awb_run

Run AWB callback function pointer.

pfn_awb_ctrl

Control AWB internalstatus callback function pointer.

pfn_awb_exit

destroy AWB callback function pointer

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.23. ISP_AWB_REGISTER_S

[Description]

Define AWB Registerstructure.

[Definition]

typedef struct _ISP_AWB_REGISTER_S {
  ISP_AWB_EXP_FUNC_S stAwbExpFunc;
} ISP_AWB_REGISTER_S;

[Members]

Member Name

Description

stAwbExpFunc

AWBRegistercallback function structure

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.24. ISP_AWB_PARAM_S

[Description]

Define ISPgiveAWBInitializeparameternumberstructure

[Definition]

typedef struct _ISP_AWB_PARAM_S {
  SENSOR_ID SensorId;
  CVI_U8 u8WDRMode;
  CVI_U8 u8AWBZoneRow;
  CVI_U8 u8AWBZoneCol;
  CVI_U8 u8AWBZoneBin;
  ISP_STITCH_ATTR_S stStitchAttr;
  CVI_U16 u16AWBWidth;
  CVI_U16 u16AWBHeight;
  CVI_S8 s8Rsv;
} ISP_AWB_PARAM_S;

[Members]

Member Name

Description

SensorId

toISPRegister Sensor ID

u8WDRMode

widthdynamicmode

u8AWBZoneRow

AWBsystemstatisticallinenumber

u8AWBZoneCol

AWBsystemstatisticalcolumnnumber

u8AWBZoneBin

AWBsystemstatisticalbrightnessnumber

stStitchAttr

stitchingmessageinformationstructure

u16AWBWidth

AWBalgorithm imagewidth

u16AWBHeight

AWBalgorithm imageheight

s8Rsv

reservedparameternumber

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.25. ISP_AWB_STAT_1_S

[Description]

Define AWBsystemstatisticalvaluemessageinformationstructure

[Definition]

typedef struct _ISP_AWB_STAT_1_S {
  CVI_U16 u16MeteringAwbAvgR;
  CVI_U16 u16MeteringAwbAvgG;
  CVI_U16 u16MeteringAwbAvgB;
  CVI_U16 u16MeteringAwbCountAll;
} ISP_AWB_STAT_1_S;

[Members]

Member Name

Description

u16MeteringAwbAvgR

Bayer domainglobalsystemstatisticalinwhite point Rcomponent

u16MeteringAwbAvgG

Bayer domainglobalsystemstatisticalinwhite point Gcomponent

u16MeteringAwbAvgB

Bayer domainglobalsystemstatisticalinwhite point B component

u16MeteringAwbCountAll

Bayer domainglobalsystemstatisticalinwhite point number

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.26. ISP_AWB_STAT_RESULT_S

[Description]

Define AWBsystemstatisticalvaluemessageinformationstructure

[Definition]

typedef struct _ISP_AWB_STAT_RESULT_S {
  CVI_U16 *pau16ZoneAvgR;
  CVI_U16 *pau16ZoneAvgG;
  CVI_U16 *pau16ZoneAvgB;
  CVI_U16 *pau16ZoneCount;
} ISP_AWB_STAT_RESULT_S;

[Members]

Member Name

Description

pau16ZoneAvgR

Bayerdomainpartregionsystemstatisticalvalueinwhite pointRcomponentarray start position

pau16ZoneAvgG

Bayerdomainpartregionsystemstatisticalvalueinwhite pointGcomponentarray start position

pau16ZoneAvgB

Bayerdomainpartregionsystemstatisticalvalueinwhite pointBcomponentarray start position

pau16ZoneCount

Bayerdomainpart regionsystemstatisticalvalueinwhite pointnumberarray start position

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.27. ISP_AWB_INFO_S

[Description]

Define ISPprovidegiveAWBsystemstatisticalvaluemessageinformation structure

[Definition]

typedef struct _ISP_AWB_INFO_S {
  CVI_U32 u32FrameCnt;
  ISP_SMART_ROI_S  stSmartInfo;
  ISP_AWB_STAT_1_S * pstAwbStat1[ISP_CHANNEL_MAX_NUM];
  ISP_AWB_STAT_RESULT_S stAwbStat2[ISP_CHANNEL_MAX_NUM];
  CVI_U8 u8AwbGainSwitch;
  CVI_U32 au32WDRWBGain[ISP_BAYER_CHN_NUM];
  CVI_U32 u32IsoNum;
  CVI_S16 s16LVx100;
  CVI_FLOAT fBVstep;
}ISP_AWB_INFO_S;

[Members]

Member Name

Description

u32FrameCnt

frame accumulateaddstatisticalnumber

stSmartInfo

specialregion information(givelicense plateorisfaceuse), pleaseReferenceISP_SMART_INFO_S interfacedescription

pstAwbStat1

AWBStatistical Information1

stAwbStat2

AWBStatistical Information2

u8AwbGainSwitch

reserved,has no effect

au32WDRWBGain

reserved,has no effect

u32IsoNum

currentimage ISOgain

s16LVx100

currentimage brightnessvaluex100

fBVstep

currentimageAEconvergence differencevalue

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.28. ISP_SMART_ROI_S

[Description]

Define ISPprovidegive AE facerecognitionorhuman shaperecognitionregionstatistical information structure

[Definition]

typedef struct _ISP_SMART_ROI_S {
  CVI_BOOL bEnable;
  CVI_BOOL bAvailable;
  CVI_U8  u8Luma;
  CVI_U8  u8Num;
  CVI_U16  u16PosX[SMART_MAX_NUM];
  CVI_U16  u16PosY[SMART_MAX_NUM];
  CVI_U16  u16Width[SMART_MAX_NUM];
  CVI_U16  u16Height[SMART_MAX_NUM];
  CVI_U16  u16FrameWidth;
  CVI_U16  u16FrameHeight;
} ISP_SMART_ROI_S;

[macro]

# define SMART_MAX_NUM (3)

[Members]

Member Name

Description

bEnable

modelwhetherEnable

bAvailable

modelwhetherhavecanuse detectionresult

u8Luma

compatibleparameternumber,Currently unused

u16PosX[SMART_MAX_NUM]

detectionoutput facepositioncorrespondingin raw on X coordinates

u16PosY[SMART_MAX_NUM]

detectionoutput facepositioncorrespondingin raw on Y coordinates

u16Width[SMART_MAX_NUM]

detectionoutput facepositioncorrespondingin raw on width

u16Height[SMART_MAX_NUM]

detectionoutput facepositioncorrespondingin raw on height

u16FrameWidth

Raw frame width

u16FrameHeight

Raw frame height

[Precautions]

  • currentonly supportsfacemodelandhuman shapemodeldetectionresult, stROIunderstandardis0whenisfacedetectionresult, understandardis1whenishuman shapedetectionresult

  • AE willaccording toprovide facein raw positiontofindoutputfaceposition AE window , andusethis AE window brightnesstoexecuteline face AE measurelightstrategy

[Related Data Types and Interfaces]

None.

3.3.29. ISP_AWB_RAW_STAT_ATTR_S

[Description]

Define AWB libReturngiveISP configurationcachestructure

[Definition]

typedef struct _ISP_AWB_RAW_STAT_ATTR_S {
  CVI_BOOL bStatCfgUpdate;
  CVI_U16 u16MeteringWhiteLevelAwb;
  CVI_U16 u16MeteringBlackLevelAwb;
  CVI_U16 u16MeteringCrRefMaxAwb;
  CVI_U16 u16MeteringCbRefMaxAwb;
  CVI_U16 u16MeteringCrRefMinAwb;
  CVI_U16 u16MeteringCbRefMinAwb;
} ISP_AWB_RAW_STAT_ATTR_S;

[Members]

Member Name

Description

bStatCfgUpdate

reserved,has no effect

u16MeteringWhiteLevelAwb

reserved,has no effect

u16MeteringBlackLevelAwb

reserved,has no effect

u16MeteringCrRefMaxAwb

reserved,has no effect

u16MeteringCbRefMaxAwb

reserved,has no effect

u16MeteringCrRefMinAwb

reserved,has no effect

u16MeteringCbRefMinAwb

reserved,has no effect

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.30. ISP_AWB_RESULT_S

[Description]

Define AWB libReturngive ISP configurationcache structure

[Definition]

typedef struct _ISP_AWB_RESULT_S {
  CVI_U32 au32WhiteBalanceGain[ISP_BAYER_CHN_NUM];
  CVI_U16 au16ColorMatrix[CCM_MATRIX_SIZE];
  CVI_U32 u32ColorTemp;
  CVI_U8 u8Saturation[4];
  ISP_AWB_RAW_STAT_ATTR_S stRawStatAttr;
  CVI_BOOL bStable;
  CVI_U8 u8AdjCASaturation;
  CVI_U8 u8AdjCASatLuma;
} ISP_AWB_RESULT_S;

[Members]

Member Name

Description

au32WhiteBalanceGain

AWB li bcalculateto R,Gr,Gb,Bcolorchannelgain

au16ColorMatrix

reserved,has no effect

u32ColorTemp

currentinAWBestimatecalculate color temperature

u8Saturation

currentsaturation

stRawStatAttr

reserved,has no effect

bStable

whetherconvergence

u8AdjCASaturation

saturationcalculateresult

u8AdjCASatLuma

brightnesscalculateresult

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.31. ISP_BIND_ATTR_S

[Description]

Define ISPlibraryandSensor, 3Alibraryofintervalbindclosesystem structure.

[Definition]

typedef struct _ISP_BIND_ATTR_S {
  CVI_S32 sensorId;
  ALG_LIB_S stAeLib;
  ALG_LIB_S stAfLib;
  ALG_LIB_S stAwbLib;
} ISP_BIND_ATTR_S;

[Members]

Member Name

Description

SensorId

RegisterSensor Id.

stAeLib

AE librarystructure.

stAwbLib

AF librarystructure.

stAfLib

AWB librarystructure.

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.32. ISP_CTRL_PARAM_S

[Description]

Define ISP Controlparameternumberstructure.

[Definition]

typedef struct _ISP_CTRL_PARAM_S {
  CVI_U32 u32AEStatIntvl;
  CVI_U32 u32AWBStatIntvl;
  CVI_U32 u32AFStatIntvl;
  CVI_U32 u32ProcParam;
  CVI_U32 u32ProcLevel;
  CVI_U32 u32UpdatePos;
  CVI_U32 u32IntTimeOut;
  CVI_U32 u32PwmNumber;
  CVI_U32 u32PortIntDelay;
} ISP_CTRL_PARAM_S;

[Members]

Member Name

Description

u32AEStatIntvl

ISP 3A AEstatistical information update frequency, unitisframe

Value Range: (0,0xffffffff]

u32AWBStatIntvl

ISP 3A AWBstatistical information update frequency, unitisframe

Value Range: (0,0xffffffff]

u32AFStatIntvl

ISP 3A AFstatistical information update frequency, unitisframe

Value Range: (0,0xffffffff]

u32ProcParam

ISP collectinformation collectfrequency, unitisframe, The default value is30, thisvaluethe moreheight, ISP CPUoccupyuseratethenthe morelow

Value Range: (0,0xffffffff]

u32ProcLevel

I SP procprintLevel, Levelis0,procfunctionDisable, levelis1, precisionsimpleinformation, levelis2, relativelymultipleinformation, levelis3, non-oftenmultipleinformation (willhandle3Asystemstatisticalvaluealsoprintoutputto)

u32UpdatePos

currentlycvitekonly supportsinframeopenstartconfigurationsensorregister, The default value is0

u32IntTimeOut

indicatesinterruptexceedwhen wheninterval (ms) . currentlycviteknohaveuse

u32PwmNumber

indicates PWM No.. currentlycviteknohaveuse

u32PortIntDelay

indicates Port interruptdelaywhenwheninterval

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.33. ISP_MOD_PARAM_S

[Description]

Define ISP moduleparameternumberstructure.

[Definition]

typedef struct _ISP_MOD_PARAM_S {
  CVI_U32 u32IntBotHalf;
} ISP_MOD_PARAM_S;

[Members]

Member Name

Description

u32IntBotHalf

indicates ISP interruptprocessingwhethercaptureuseunderhalfpartmachinecontrol, The default value is0,currentlycvitekonly supports (readstatistical informationandconfigurationsensor and ISPsame stepregister) ininterrupt serviceprogramincomplete;

[Precautions]

None.

[Related Data Types and Interfaces]

3.3.34. ISP_IR_AUTO_ATTR_S

[Description]

Define redoutsideautomaticswitchattribute.

[Definition]

typedef struct _ISP_IR_AUTO_ATTR_S
{
  CVI_BOOL bEnable;
  CVI_U32 u32Normal2IrIsoThr;
  CVI_U32 u32Ir2NormalIsoThr;
  CVI_U32 u32RGMax;
  CVI_U32 u32RGMin;
  CVI_U32 u32BGMax;
  CVI_U32 u32BGMin;
  ISP_IR_STATUS_E enIrStatus;
  ISP_IR_SWITCH_STATUS_E enIrSwitch;
} ISP_IR_AUTO_ATTR_S;

[Members]

Member Name

Description

bEnable

redoutsideautomaticswitchEnable.

CVI_FALSE: Disable

CVI_TRUE: Enable.

u32Normal2IrIsoThr

fromnormalstatusswitchtoredoutsidestatus ISOthreshold. whenactualtakes effect ISOlargeinthis thresholdwhen, systemsystemneed toswitchtoredoutsidestatus.

Value Range: [0, 0xFFFFFFFF].

u32Ir2NormalIsoThr

fromredoutsidestatusswitchtonormalstatus ISOthreshold. whenactualtakes effect ISOsmallinthis thresholdwhen, systemsystemneed toswitchtonormalstatus.

Value Range: [0, 0xFFFFFFFF].

u32RGMax

redoutsidestatusunder R/Gmaximumvalue. actualimage R/Glargeinthisparameternumberwhen, systemsystemneed toswitchtonormalstatus. 4.8format.

Value Range: [0, 0xFFF].

u32RGMin

redoutsidestatusunder R/Gminimumvalue. actualimage R/Gsmallinthisparameternumberwhen, systemsystemneed toswitchtonormalstatus. 4.8format.

Value Range: [0, u32RGMax].

u32BGMax

redoutsidestatusunder B/Gmaximumvalue. actualimage B/Glargeinthisparameternumberwhen, systemsystemneed needswitchto normalstatus. 4.8format.

Value Range: [0,0xFFF].

u32BGMin

redoutsidestatusunder B/Gminimumvalue. actual actualimage B/Gsmallinthisparameternumberwhen, systemsystemneed needswitchtonormalstatus. 4.8format.

Value Range: [0, u32BGMax].

enIrStatus

devicecurrent redoutsidestatus. shouldconfiguration isdeviceactual redoutsidestatus, need touserprotect verifystatus correctproperty.

enIrSwitch

device redoutsideswitchstatus, isonlyread.

[Precautions]

None.

[Related Data Types and Interfaces]

None.

3.3.35. ISP_STITCH_ATTR_S

[Description]

Define ISP stitchingparameternumberstructure.

[Definition]

typedef struct ISP_STITCH_ATTR_T {
CVI_BOOL enable;
CVI_BOOL bMainPipe;
CVI_BOOL bCalibEnable;
CVI_BOOL bCombineSts;
CVI_U8  u8CombChnSum;
CVI_U8  u8CombChn;
CVI_U8  u8Group;
CVI_U32 u32CalibLumaRatio;
CVI_U32 u32CalibRGainRatio;
CVI_U32 u32CalibBGainRatio;
} ISP_STITCH_ATTR_S;

[Members]

Member Name

Description

enable

stitchingfunction enable

CVI_FALSE: Disable

CVI_TRUE: Enable

bMainPipe

whetherismainchannel, whenISPstitchingEnableafter, fromchannelAE, AWB resultparameternumberandmainchannelkeepconsistent.

CVI_FALSE: fromchannel

CVI_TRUE: mainchannel

bCombineSts

whethergroupcombinesystemstatisticalvalue, groupcombinesystemstatisticalvalueafterAE, AWBcalculatewhencantake into accountSetgroupcombine channel.

CVI_FALSE: notgroupcombine

CVI_TRUE: groupcombine

bCalibEnable

whetherEnablecalibrationparameternumber.

CVI_FALSE: notusecalibrationparameternumber

CVI_TRUE: Enablecalibrationparameternumber

u8CombChnSum

groupcombinesystemstatisticalvaluechanneltotalnumber.

Value Range: [0, 0x6]

u8CombChn

currentgroupcombinesystemstatisticalvaluechannelNo.

Value Range: [0, 0x6]

u8Group

stitchinggroupnumber.

Value Range: [0,0x2]

u32CalibLumaRatio

currentchannelandotherchannelbrightnessdifferenceratioexample (1024is1)

Value Range: [0, 0x1000]

u32CalibRGainRatio

currentchannelandotherchannelRGaindifferenceratioexample (1024is1)

Value Range: [0, 0x1000]

u32CalibBGainRatio

currentchannelandotherchannelBGaindifferenceratioexample (1024is1)

Value Range: [0, 0x1000]

[Precautions]

None.

[Related Data Types and Interfaces]

None.