15. CNR

15.1. Functional Description

in YUV Domain forchrominancenoiseperform spatial domainnoise reductionalgorithm. cv184x systemcolumn CNR modulethroughdualedgefilteringprocessingforUVchannelperformoverall noise reductionprocessing.

15.2. API Reference

15.2.1. CVI_ISP_SetCNRAttr

[Description]

SetCNR parameter attributes

[Syntax]

CVI_S32 CVI_ISP_SetCNRAttr(VI_PIPE ViPipe, const ISP_CNR_ATTR_S *pstCNRAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstCNRAttr

CNR parameter attributes

Input

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

VI_PIPE ViPipe = 0;
ISP_CNR_ATTR_S stAttr;
CVI_ISP_GetCNRAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetCNRAttr(ViPipe, &stAttr);

[Related Topics]

15.2.2. CVI_ISP_GetCNRAttr

[Description]

GetCNR parameter attributes

[Syntax]

CVI_S32 CVI_ISP_GetCNRAttr(VI_PIPE ViPipe, ISP_CNR_ATTR_S *pstCNRAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstCNRAttr

CNR parameter attributes

output

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

None

[Related Topics]

15.2.3. CVI_ISP_SetCNRFilterAttr

[Description]

SetCNR FILTER parameter attributes

[Syntax]

CVI_S32 CVI_ISP_SetCNRFilterAttr(VI_PIPE ViPipe, const ISP_CNR_FILTER_ATTR_S *pstCNRFilterAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstCNRFilterAttr

CNR FILTER parameter attributes

Input

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

VI_PIPE ViPipe = 0;
ISP_CNR_FILTER_ATTR_S stAttr;
CVI_ISP_GetCNRFilterAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetCNRFilterAttr(ViPipe, &stAttr);

[Related Topics]

15.2.4. CVI_ISP_GetCNRFilterAttr

[Description]

GetCNR FILTER parameter attributes

[Syntax]

CVI_S32 CVI_ISP_GetCNRFilterAttr(VI_PIPE ViPipe, ISP_CNR_FILTER_ATTR_S *pstCNRFilterAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstCNRFilterAttr

CNR FILTER parameter attributes

output

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

None

[Related Topics]

15.3. Data Types

15.3.1. ISP_CNR_MANUAL_ATTR_S

[Description]

Manual DefinitionCNR parameter attributes

[Definition]

typedef struct _ISP_CNR_MANUAL_ATTR_S {
        CVI_U8 MedianFltKsize; /*Rw; Range:[0, 2]*/
        CVI_U8 CnrByMotion[3]; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrRefYStr; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrRefUVStr; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrYRange; /*Rw; Range:[0, 3]*/
        CVI_U8 CnrYThr; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrYPrcStr; /*Rw; Range:[0, 2]*/
        CVI_U8 CnrYStrH; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrYStrT; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrUVRange; /*Rw; Range:[0, 4]*/
        CVI_U8 CnrUVThr; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrUVPrcStr; /*Rw; Range:[0, 3]*/
        CVI_U8 CnrUVStrH; /*Rw; Range:[0, 64]*/
        CVI_U8 CnrUVStrT; /*Rw; Range:[0, 64]*/
        CVI_U8 CnrSatRange; /*Rw; Range:[0, 3]*/
        CVI_U8 CnrSatPrtThr; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrSatPrcStr; /*Rw; Range:[0, 2]*/
        CVI_U8 CnrSatStrH; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrSatStrT; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrSatBldCoring; /*Rw; Range:[0, 32]*/
} ISP_CNR_MANUAL_ATTR_S;

[Members]

Member Name

Description

MedianFltKsize

Filter size selection for CMF.

Value Range: [0, 2]

Data Types: CVI_U8

CnrByMotion

Controldifferentmotionstatusunder CNRstrength. CnrByMotion[0]~CnrByMotion[2]respectivelycorrespondingstationary region, conversionregion, motion region.

Value Range: [0, 31]

Data Types: CVI_U8

CnrRefYStr

in Y channelon chrominanceReferenceweight.

Value Range: [0, 31]

Data Types: CVI_U8

CnrRefUVStr

in UV channelon chrominanceReferenceweight.

Value Range: [0, 31]

Data Types: CVI_U8

CnrYRange

in Y channelon brightnessdifferencethreshold. the larger the value, heightbrightnessdifferencethresholdthe larger the value, CnrYStrHforheightbrightnessdifferenceregion affectsrangethe morelarge.

Value Range: [0, 3]

Data Types: CVI_U8

CnrYThr

in Y channelon brightnessdifferencethreshold. brightnessdifferencelowinCnrYThr part, CNRstrengthbyCnrYStrHControl.

Value Range: [0, 31]

Data Types: CVI_U8

CnrYPrcStr

Chroma adaptation weighting precision for Y channel.

0: 8; 1: 16; 2: 32;

Value Range: [0, 2]

Data Types: CVI_U8

CnrYStrH

in Y channelonControlbrightnessdifferencerelativelysmall region CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrYStrT

in Y channelonControlbrightnessdifferencerelativelylarge region CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrUVRange

in UV channelonControlheightcolor differencethreshold. the larger the value, heightcolor differencethresholdthe larger the value, CnrUVStrHforheightcolor differenceregion affectsrangethe morelarge.

0: 8; 1: 16; 2: 32; 3: 64; 4: 128; 7-5: Reserved;

Value Range: [0, 4]

Data Types: CVI_U8

CnrUVThr

in UV channelonControlheightsaturationandthreshold. the larger the value, heightsaturationandthresholdthe larger the value, CnrSatStrHforheightsaturationandregion affectsrangethe morelarge.

Value Range: [0, 32]

Data Types: CVI_U8

CnrUVPrcStr

Chroma adaptation weighting precision for UV channels.

0: 8; 1: 16; 2: 32; 3: 64;

Value Range: [0, 3]

Data Types: CVI_U8

CnrUVStrH

in UV channelonControllowcolor differenceregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 64]

Data Types: CVI_U8

CnrUVStrT

in UV channelonControlheightcolor differenceregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 64]

Data Types: CVI_U8

CnrSatRange

Controlheightsaturationandthreshold. the larger the value, heightsaturationandthresholdthe larger the value, CnrSatStrHforheightsaturationandregion affectsrangethe morelarge.

0: 8; 1: 16; 2: 32; 3: 64;

Value Range: [0, 3]

Data Types: CVI_U8

CnrSatPrtThr

lowsaturationthreshold. saturationlowinCnrSatPrtThr part, CNRstrengthbyCnrSatStrHControl.

Value Range: [0, 31]

Data Types: CVI_U8

CnrSatPrcStr

Chroma adaptation weighting precision for Saturation.

0: 8; 1: 16; 2: 32;

Value Range: [0, 2]

Data Types: CVI_U8

CnrSatStrH

Controllowsaturationregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrSatStrT

Controlheightsaturationregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrSatBldCoring

Chroma adaptation weighting for Saturation blending.

Value Range: [0, 32]

Data Types: CVI_U8

[Precautions]

None

[Related Data Types and Interfaces]

15.3.2. ISP_CNR_AUTO_ATTR_S

[Description]

Automatic DefinitionCNR parameter attributes

[Definition]

typedef struct _ISP_CNR_AUTO_ATTR_S {
        CVI_U8 MedianFltKsize[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 2]*/
        CVI_U8 CnrByMotion[3][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrRefYStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrRefUVStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrYRange[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 3]*/
        CVI_U8 CnrYThr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrYPrcStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 2]*/
        CVI_U8 CnrYStrH[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrYStrT[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrUVRange[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 4]*/
        CVI_U8 CnrUVThr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrUVPrcStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 3]*/
        CVI_U8 CnrUVStrH[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 64]*/
        CVI_U8 CnrUVStrT[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 64]*/
        CVI_U8 CnrSatRange[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 3]*/
        CVI_U8 CnrSatPrtThr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 CnrSatPrcStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 2]*/
        CVI_U8 CnrSatStrH[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrSatStrT[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 32]*/
        CVI_U8 CnrSatBldCoring[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 32]*/
} ISP_CNR_AUTO_ATTR_S;

[Members]

Member Name

Description

MedianFltKsize

Filter size selection for CMF.

Value Range: [0, 2]

Data Types: CVI_U8

CnrByMotion

Controldifferentmotionstatusunder CNRstrength. CnrByMotion[0]~CnrByMotion[2]respectivelycorrespondingstationary region, conversionregion, motion region.

Value Range: [0, 31]

Data Types: CVI_U8

CnrRefYStr

in Y channelon chrominanceReferenceweight.

Value Range: [0, 31]

Data Types: CVI_U8

CnrRefUVStr

in UV channelon chrominanceReferenceweight.

Value Range: [0, 31]

Data Types: CVI_U8

CnrYRange

in Y channelon brightnessdifferencethreshold. the larger the value, heightbrightnessdifferencethresholdthe larger the value, CnrYStrHforheightbrightnessdifferenceregion affectsrangethe morelarge.

Value Range: [0, 3]

Data Types: CVI_U8

CnrYThr

in Y channelon brightnessdifferencethreshold. brightnessdifferencelowinCnrYThr part, CNRstrengthbyCnrYStrHControl.

Value Range: [0, 31]

Data Types: CVI_U8

CnrYPrcStr

Chroma adaptation weighting precision for Y channel.

0: 8; 1: 16; 2: 32;

Value Range: [0, 2]

Data Types: CVI_U8

CnrYStrH

in Y channelonControlbrightnessdifferencerelativelysmall region CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrYStrT

in Y channelonControlbrightnessdifferencerelativelylarge region CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrUVRange

in UV channelonControlheightcolor differencethreshold. the larger the value, heightcolor differencethresholdthe larger the value, CnrUVStrHforheightcolor differenceregion affectsrangethe morelarge.

0: 8; 1: 16; 2: 32; 3: 64; 4: 128; 7-5: Reserved;

Value Range: [0, 4]

Data Types: CVI_U8

CnrUVThr

in UV channelonControlheightsaturationandthreshold. the larger the value, heightsaturationandthresholdthe larger the value, CnrSatStrHforheightsaturationandregion affectsrangethe morelarge.

Value Range: [0, 32]

Data Types: CVI_U8

CnrUVPrcStr

Chroma adaptation weighting precision for UV channels.

0: 8; 1: 16; 2: 32; 3: 64;

Value Range: [0, 3]

Data Types: CVI_U8

CnrUVStrH

in UV channelonControllowcolor differenceregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 64]

Data Types: CVI_U8

CnrUVStrT

in UV channelonControlheightcolor differenceregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 64]

Data Types: CVI_U8

CnrSatRange

Controlheightsaturationandthreshold. the larger the value, heightsaturationandthresholdthe larger the value, CnrSatStrHforheightsaturationandregion affectsrangethe morelarge.

0: 8; 1: 16; 2: 32; 3: 64;

Value Range: [0, 3]

Data Types: CVI_U8

CnrSatPrtThr

lowsaturationthreshold. saturationlowinCnrSatPrtThr part, CNRstrengthbyCnrSatStrHControl.

Value Range: [0, 31]

Data Types: CVI_U8

CnrSatPrcStr

Chroma adaptation weighting precision for Saturation.

0: 8; 1: 16; 2: 32;

Value Range: [0, 2]

Data Types: CVI_U8

CnrSatStrH

Controllowsaturationregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrSatStrT

Controlheightsaturationregion CNRstrength. the larger the value, the greater the denoising strength.

Value Range: [0, 32]

Data Types: CVI_U8

CnrSatBldCoring

Chroma adaptation weighting for Saturation blending.

Value Range: [0, 32]

Data Types: CVI_U8

[Precautions]

None

[Related Data Types and Interfaces]

15.3.3. ISP_CNR_ATTR_S

[Description]

Define CNR parameter attributes

[Definition]

typedef struct _ISP_CNR_ATTR_S {
        CVI_BOOL Enable; /*Rw; Range:[0, 1]*/
        ISP_OP_TYPE_E enOpType;
        CVI_U8 UpdateInterval; /*Rw; Range:[1, 255]*/
        CVI_BOOL MedianFltEnable; /*Rw; Range:[0, 1]*/
        CVI_BOOL CnrEnable; /*Rw; Range:[0, 1]*/
        CVI_BOOL CnrSatBldEnable; /*Rw; Range:[0, 1]*/
        CVI_U8 SubSclSel; /*Rw; Range:[0, 1]*/
        CVI_U8 CnrDebugMode; /*Rw; Range:[0, 6]*/
        CVI_BOOL CnrBypass1; /*Rw; Range:[0, 1]*/
        CVI_BOOL CnrBypass2; /*Rw; Range:[0, 1]*/
        ISP_CNR_SCALE_FACTOR_E SubImgSclFactor;
        ISP_CNR_MANUAL_ATTR_S stManual;
        ISP_CNR_AUTO_ATTR_S stAuto;
} ISP_CNR_ATTR_S;

[Members]

Member Name

Description

Enable

module enable switch

Value Range: [0, 1]

Data Types: CVI_BOOL

enOpType

operation type

OP_TYPE_AUTO: automatic mode

OP_TYPE_MANUAL: manual mode

Data Types: ISP_OP_TYPE_E

UpdateInterval

affects the parameter update interval,the larger the value, the slower the image changes,the better the performance.

Value Range: [1, 255]

Data Types: CVI_U8

MedianFltEnable

UVchannelprefilteringprocessingEnable. Enable = 1whentakes effect.

Value Range: [0, 1]

Data Types: CVI_BOOL

CnrEnable

CNR module enable

Value Range: [0, 1]

Data Types: CVI_BOOL

CnrSatBldEnable

enable sat blend

Value Range: [0, 1]

Data Types: CVI_BOOL

SubSclSel

Selection sub-image output flow:

0: output sub image after LCA;

1: output sub image before CMF.

Value Range: [0, 1]

Data Types: CVI_U8

CnrDebugMode

Register debug mode

0: no debug, normal output; 1: debug output wY, wUV, w;

2: debug output abs distU, distV,distUV; 3: debug output sat weight; 4: debug output SAT blend out; 5: debug output cnr motion;

6: debug output subimg sclupimg;

Value Range: [0, 6]

Data Types: CVI_U8

CnrBypass1

Set 1 to bypass chra(LCA)

Value Range: [0, 1]

Data Types: CVI_BOOL

CnrBypass2

according tobrightnessdifference, saturation, color difference, motionstatusAdjustCNRstrength function enable.

Value Range: [0, 1]

Data Types: CVI_BOOL

SubImgSclFactor

Sub image scaling factor

Data Types: ISP_CNR_SCALE_FACTOR_E

stManual

manual parameters

stAuto

automatic parameters

[Precautions]

None

[Related Data Types and Interfaces]

15.3.4. ISP_CNR_FILTER_MANUAL_ATTR_S

[Description]

Manual DefinitionCNR FILTER parameter attributes

[Definition]

typedef struct _ISP_CNR_FILTER_MANUAL_ATTR_S {
        CVI_U8 SubImgNrFltKsize; /*Rw; Range:[0, 3]*/
        CVI_U8 SubImgNrEdgeDirPN; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrEdgeDirHV; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrEdgeKsize; /*Rw; Range:[0, 1]*/
        CVI_U8 SubImgNrYCRef; /*Rw; Range:[0, 31]*/
        CVI_U8 SubImgNrUVCRef; /*Rw; Range:[0, 31]*/
        CVI_U8 OutierThY; /*Rw; Range:[0, 7]*/
        CVI_U8 OutierThUV; /*Rw; Range:[0, 7]*/
        CVI_U8 YOutierDifTh; /*Rw; Range:[0, 255]*/
        CVI_U8 UOutierDifTh; /*Rw; Range:[0, 255]*/
        CVI_U8 VOutierDifTh; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrRefCThrYDif[3]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrRefCStrY[4]; /*Rw; Range:[0, 8]*/
        CVI_U8 SubImgNrRefCThrUVDif[3]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrRefCStrUV[4]; /*Rw; Range:[0, 8]*/
        CVI_U8 SubImgNrDirFltThrY[5]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrDirFltStrY[6]; /*Rw; Range:[0, 16]*/
        CVI_U8 SubImgNrDirFltThrU[5]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrDirFltStrU[6]; /*Rw; Range:[0, 16]*/
        CVI_U8 SubImgNrDirFltThrV[5]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrDirFltStrV[6]; /*Rw; Range:[0, 16]*/
} ISP_CNR_FILTER_MANUAL_ATTR_S;

[Members]

Member Name

Description

SubImgNrFltKsize

Filter size selection for Y/UV channels

0: 3x3; 1: 5x5; 2: 7x7; 3: 9x9;

Value Range: [0, 3]

Data Types: CVI_U8

SubImgNrEdgeDirPN

positive(negative)45degreedirectiondeterminethreshold. the larger the value, the moreeasydetermineisNonedirection. valuethroughlarge, easyproducebecomeedgebleedcolorproblem.

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrEdgeDirHV

horizontal/verticalhistogramtodeterminethreshold. the larger the value, the moreeasydetermineisNonedirection. valuethroughlarge, easyproducebecomeedgebleedcolorproblem.

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrEdgeKsize

Edge kernel size selection.

0: 3x3; 1: 5x5;

Value Range: [0, 1]

Data Types: CVI_U8

SubImgNrYCRef

Reference center weighting for Y channel

Value Range: [0, 31]

Data Types: CVI_U8

SubImgNrUVCRef

Reference center weighting for UV channel

Value Range: [0, 31]

Data Types: CVI_U8

OutierThY

Reference center outlier threshold of Y channel

Value Range: [0, 7]

Data Types: CVI_U8

OutierThUV

Reference center outlier threshold of UV channel

Value Range: [0, 7]

Data Types: CVI_U8

YOutierDifTh

Reference center outlier difference threshold for Y channel

Value Range: [0, 255]

Data Types: CVI_U8

UOutierDifTh

Reference center outlier difference threshold for U channel

Value Range: [0, 255]

Data Types: CVI_U8

VOutierDifTh

Reference center outlier difference threshold for V channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrRefCThrYDif

Range filter threshold for reference center of Y channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrRefCStrY

Range filter weighting for 0x0] reference center of Y channel

Value Range: [0, 8]

Data Types: CVI_U8

SubImgNrRefCThrUVDif

Range filter threshold for reference center of UV channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrRefCStrUV

Range filter weighting for 0x0] reference center of UV channel

Value Range: [0, 8]

Data Types: CVI_U8

SubImgNrDirFltThrY

Filter threshold for Y channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrDirFltStrY

Filter weighting for Y channel

Value Range: [0, 16]

Data Types: CVI_U8

SubImgNrDirFltThrU

Filter threshold for U channel, andSubImgNrDirFltStrUtotalsameControlUchannel noise reduction strength

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrDirFltStrU

Filter threshold for U channel, andSubImgNrDirFltThrUtotalsameControlUchannel noise reduction strength

Value Range: [0, 16]

Data Types: CVI_U8

SubImgNrDirFltThrV

Filter threshold for V channel, andSubImgNrDirFltStrVtotalsameControlVchannel noise reduction strength

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrDirFltStrV

Filter threshold for V channel, andSubImgNrDirFltThrVtotalsameControlVchannel noise reduction strength

Value Range: [0, 16]

Data Types: CVI_U8

[Precautions]

None

[Related Data Types and Interfaces]

15.3.5. ISP_CNR_FILTER_AUTO_ATTR_S

[Description]

Automatic DefinitionCNR FILTER parameter attributes

[Definition]

typedef struct _ISP_CNR_FILTER_AUTO_ATTR_S {
        CVI_U8 SubImgNrFltKsize[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 3]*/
        CVI_U8 SubImgNrEdgeDirPN[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrEdgeDirHV[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrEdgeKsize[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 1]*/
        CVI_U8 SubImgNrYCRef[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 SubImgNrUVCRef[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 31]*/
        CVI_U8 OutierThY[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 7]*/
        CVI_U8 OutierThUV[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 7]*/
        CVI_U8 YOutierDifTh[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 UOutierDifTh[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 VOutierDifTh[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrRefCThrYDif[3][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrRefCStrY[4][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 8]*/
        CVI_U8 SubImgNrRefCThrUVDif[3][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrRefCStrUV[4][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 8]*/
        CVI_U8 SubImgNrDirFltThrY[5][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrDirFltStrY[6][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 16]*/
        CVI_U8 SubImgNrDirFltThrU[5][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrDirFltStrU[6][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 16]*/
        CVI_U8 SubImgNrDirFltThrV[5][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
        CVI_U8 SubImgNrDirFltStrV[6][ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 16]*/
} ISP_CNR_FILTER_AUTO_ATTR_S;

[Members]

Member Name

Description

SubImgNrFltKsize

Filter size selection for Y/UV channels

0: 3x3; 1: 5x5; 2: 7x7; 3: 9x9;

Value Range: [0, 3]

Data Types: CVI_U8

SubImgNrEdgeDirPN

positive(negative)45degreedirectiondeterminethreshold. the larger the value, the moreeasydetermineisNonedirection. valuethroughlarge, easyproducebecomeedgebleedcolorproblem.

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrEdgeDirHV

horizontal/verticalhistogramtodeterminethreshold. the larger the value, the moreeasydetermineisNonedirection. valuethroughlarge, easyproducebecomeedgebleedcolorproblem.

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrEdgeKsize

Edge kernel size selection.

0: 3x3; 1: 5x5;

Value Range: [0, 1]

Data Types: CVI_U8

SubImgNrYCRef

Reference center weighting for Y channel

Value Range: [0, 31]

Data Types: CVI_U8

SubImgNrUVCRef

Reference center weighting for UV channel

Value Range: [0, 31]

Data Types: CVI_U8

OutierThY

Reference center outlier threshold of Y channel

Value Range: [0, 7]

Data Types: CVI_U8

OutierThUV

Reference center outlier threshold of UV channel

Value Range: [0, 7]

Data Types: CVI_U8

YOutierDifTh

Reference center outlier difference threshold for Y channel

Value Range: [0, 255]

Data Types: CVI_U8

UOutierDifTh

Reference center outlier difference threshold for U channel

Value Range: [0, 255]

Data Types: CVI_U8

VOutierDifTh

Reference center outlier difference threshold for V channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrRefCThrYDif

Range filter threshold for reference center of Y channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrRefCStrY

Range filter weighting for 0x0] reference center of Y channel

Value Range: [0, 8]

Data Types: CVI_U8

SubImgNrRefCThrUVDif

Range filter threshold for reference center of UV channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrRefCStrUV

Range filter weighting for 0x0] reference center of UV channel

Value Range: [0, 8]

Data Types: CVI_U8

SubImgNrDirFltThrY

Filter threshold for Y channel

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrDirFltStrY

Filter weighting for Y channel

Value Range: [0, 16]

Data Types: CVI_U8

SubImgNrDirFltThrU

Filter threshold for U channel, andSubImgNrDirFltStrUtotalsameControlUchannel noise reduction strength

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrDirFltStrU

Filter threshold for U channel, andSubImgNrDirFltThrUtotalsameControlUchannel noise reduction strength

Value Range: [0, 16]

Data Types: CVI_U8

SubImgNrDirFltThrV

Filter threshold for V channel, andSubImgNrDirFltStrVtotalsameControlVchannel noise reduction strength

Value Range: [0, 255]

Data Types: CVI_U8

SubImgNrDirFltStrV

Filter threshold for V channel, andSubImgNrDirFltThrVtotalsameControlVchannel noise reduction strength

Value Range: [0, 16]

Data Types: CVI_U8

[Precautions]

None

[Related Data Types and Interfaces]

15.3.6. ISP_CNR_FILTER_ATTR_S

[Description]

Define CNR FILTER parameter attributes

[Definition]

typedef struct _ISP_CNR_FILTER_ATTR_S {
        CVI_BOOL SubImgNrEnable; /*Rw; Range:[0, 1]*/
        CVI_BOOL YNrEnable; /*Rw; Range:[0, 1]*/
        CVI_BOOL EdgeDebugEnable; /*Rw; Range:[0, 1]*/
        CVI_BOOL RefCenterDebugEnable; /*Rw; Range:[0, 1]*/
        ISP_CNR_FILTER_MANUAL_ATTR_S stManual;
        ISP_CNR_FILTER_AUTO_ATTR_S stAuto;
} ISP_CNR_FILTER_ATTR_S;

[Members]

Member Name

Description

SubImgNrEnable

Set 1 to enable filter for ife2 sub image.

Value Range: [0, 1]

Data Types: CVI_BOOL

YNrEnable

IFE2 enable key for Y.

Value Range: [0, 1]

Data Types: CVI_BOOL

EdgeDebugEnable

Debug key for Edge map in IFE2.

Value Range: [0, 1]

Data Types: CVI_BOOL

RefCenterDebugEnable

Debug key for Ref center filter in IFE2.

Value Range: [0, 1]

Data Types: CVI_BOOL

stManual

manual parameters

stAuto

automatic parameters

[Precautions]

None

[Related Data Types and Interfaces]