1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
<?xml version="1.0" encoding="utf-8"?>
<Config>
<FCVE> <!-- 单目人像分割网络模型 -->
<spotTemplateFile>/vendor/etc/camera/dcamera/spotTemplateData.dat</spotTemplateFile>
<gpuBinFile>/chip_prod/etc/camera/libcl/wideAperture.bin</gpuBinFile>
<depthScale>4</depthScale>
<inOutDataType>1</inOutDataType> <!-- 0 uint8, 1 float -->
<previewSegModel enable="1"> <!-- 0: disable 1: enable -->
<modelWidth>480</modelWidth>
<modelHeight>480</modelHeight>
<outWidth>120</outWidth>
<outHeight>120</outHeight>
<modelPath>/vendor/etc/camera/semantic/model/human/body_seg_rt_480.om</modelPath>
<isSoftmax>0</isSoftmax>
<normData>0</normData>
</previewSegModel>
<isSupportAipp>1</isSupportAipp>
</FCVE>
<Global>
<FrontCamera>1</FrontCamera> <!-- 前置开关,前置设1,后置设0 -->
</Global>
<AlgorithmPreprocessInfo>
</AlgorithmPreprocessInfo>
<AlgorithmDCInfo>
<portraitSegmentAlg enable="1"> <!-- 0: disable 1: enable -->
<modelWidth>480</modelWidth>
<modelHeight>480</modelHeight>
<outWidth>120</outWidth>
<outHeight>120</outHeight>
<modelPath>/vendor/etc/camera/semantic/model/human/body_seg_rt_480.om</modelPath>
<isSoftmax>0</isSoftmax>
<normData>0</normData>
</portraitSegmentAlg>
<mattingAlg enable="0"> <!-- 0: disable 1: enable -->
<modelWidth>640</modelWidth>
<modelHeight>640</modelHeight>
<modelPath>/vendor/etc/camera/cnnmodel/dualcamera/matting.ms</modelPath>
<isSoftmax>0</isSoftmax>
<normData>2</normData>
</mattingAlg>
<denseDispAlg>
<denseOptAlg>
<deburrEnable>0</deburrEnable> <!-- 0: disable 1: enable -->
<tofFrontCamera>0</tofFrontCamera> <!-- 0: tof is rear camera 1: tof is front camera-->
<tofGuideEnable>0</tofGuideEnable> <!-- 0: disable 1: enable -->
<tofModifyEnable>0</tofModifyEnable> <!-- 0: disable 1: enable -->
<portraitPlaneEnable>1</portraitPlaneEnable> <!-- 0: disable 1: enable -->
<cropAdaptEnable>1</cropAdaptEnable>
<twoPlaneMode>1</twoPlaneMode> <!-- cherry 1:对概率值双边二值化 0:对深度值双边 -->
<numTwoPlaneHoleThres>10</numTwoPlaneHoleThres> <!-- cherry场景镂空数阈值 -->
<fewHoleFrontVariance>57</fewHoleFrontVariance> <!-- cherry场景少镂空时前景方差阈值 -->
<fewHoleBackVariance>50</fewHoleBackVariance> <!-- cherry场景少镂空时后景方差阈值 -->
<manyHoleFrontVariance>110</manyHoleFrontVariance> <!-- cherry场景多镂空时前景方差阈值 -->
<manyHoleBackVariance>80</manyHoleBackVariance> <!-- cherry场景多镂空时前景方差阈值 -->
<fewHoleNotPortraitValidRatio>40</fewHoleNotPortraitValidRatio> <!-- cherry场景少镂空时非人像稠密度阈值 -->
<manyHoleNotPortraitValidRatio>30</manyHoleNotPortraitValidRatio> <!-- cherry场景多镂空时非人像稠密度阈值 -->
<cherry_seg_switch>1</cherry_seg_switch> <!-- cherry场景多镂空时非人像稠密度阈值 -->
<railOptEnable>1</railOptEnable> <!-- 0: disable 1: enable -->
</denseOptAlg>
<mattingWithCnnMask>1</mattingWithCnnMask> <!-- matting分割是否使用人像分割结果作为输入 -->
<hasMattingOutput>0</hasMattingOutput> <!-- 是否输出matting 结果 -->
<PortraitDepthParam>
<maskTh>100</maskTh> <!-- 人像分割mask阈值 -->
<maskDispVal>8</maskDispVal> <!-- maskTh映射成视差的值 -->
<filterAreaRatio>0.03</filterAreaRatio> <!-- 孤立mask阈值比例,占全图 -->
<isSupportAipp>1</isSupportAipp>
</PortraitDepthParam>
</denseDispAlg>
</AlgorithmDCInfo>
<AlgorithmRFInfo>
<frontFilterEnable>1</frontFilterEnable> <!-- IIR filter -->
<edgeFilterEnable>1</edgeFilterEnable> <!-- 保边上采样 -->
<blurEnhanceRatio>1.0</blurEnhanceRatio> <!-- [0.5, 2.0] -->
<dofEnhanceRatio>1.0</dofEnhanceRatio> <!-- [0.5, 5.0] -->
<spotTh>220</spotTh> <!-- [80, 255] -->
<portraitBlurEnhanceRatio>1.0</portraitBlurEnhanceRatio> <!-- [0.5, 2.0] -->
<spotEnhanceEnable>0</spotEnhanceEnable> <!--光斑修圆-->
<srcWeightSwirlAndDiscsRatio>5</srcWeightSwirlAndDiscsRatio>
<srcWeightHeartRatio>3</srcWeightHeartRatio>
<portraitAutoAdjustFocusPointEnable>1</portraitAutoAdjustFocusPointEnable> <!--人像模式多人场景自动选择对焦人脸-->
<noiseUniformEnable>1</noiseUniformEnable> <!--前后景噪声一致性-->
<noiseUniformStrength>6</noiseUniformStrength> <!--噪声强度 [0, 10]-->
<noiseUniformIsoTh>10</noiseUniformIsoTh> <!--iso阈值/10 [0, 255]-->
<noiseWH>300</noiseWH>
<noiseFile>/vendor/etc/camera/dcamera/noise.bin</noiseFile>
<weightEnhanceCoefSpot>5</weightEnhanceCoefSpot> <!--光斑增强系数 [1, 30]-->
<spotShapeAndContrastEnhanceEnable>1</spotShapeAndContrastEnhanceEnable> <!-- 0: disable 1: enable -->
<dofAdaptiveNearFocusDistanceThr>6</dofAdaptiveNearFocusDistanceThr> <!--近距离阈值[0,255]分米-->
<dofAdaptiveFarFocusDistanceThr>20</dofAdaptiveFarFocusDistanceThr> <!--远距离阈值[0,255]分米-->
<dofAdaptiveNearDofRatioThr>15</dofAdaptiveNearDofRatioThr> <!--近距离dof值[5,50]/10-->
<dofAdaptiveFarDofRatioThr>10</dofAdaptiveFarDofRatioThr> <!--远距离dof值[5,50]/10-->
<circleFilterFlareDilateR>7</circleFilterFlareDilateR> <!--光斑检测的腐蚀半径[3-10]-->
<farFocusBlurEnhanceEnable>0</farFocusBlurEnhanceEnable> <!--主体离得远时虚化增强使能-->
<flaresColorOptCoef>25</flaresColorOptCoef> <!--光斑颜色饱和度系数[10~35]-->
<flaresBrightnessCoef>18</flaresBrightnessCoef> <!--光斑亮度系数[1~25]-->
<alphaEdgeSoftEnable>1</alphaEdgeSoftEnable> <!--alpha边缘平滑优化-->
<portraitFrontBlurEnable>0</portraitFrontBlurEnable> <!--人像模式前景虚化使能-->
<matteHairEnhanceDisable>1</matteHairEnhanceDisable> <!--matte导图发丝高频增强置零-->
<flaresOptInDarkEnable>1</flaresOptInDarkEnable> <!--暗光场景光斑优化-->
<bgAdaptEnhanceEnable>0</bgAdaptEnhanceEnable> <!--背景自适应虚化增强使能-->
<realDofAdjustEnable>1</realDofAdjustEnable> <!--焦距缩放开启-->
<circleBlurCheckEnable>1</circleBlurCheckEnable> <!--使用内聚式判断虚化-->
<matButiAlg enable="0"> <!-- 0: disable 1: enable -->
<modelWidth>768</modelWidth>
<modelHeight>768</modelHeight>
<modelPath>/vendor/etc/camera/cnnmodel/dualcamera/perfectBokehInterp.ms</modelPath>
<isSoftmax>1</isSoftmax>
<normData>2</normData>
<useGPU>0</useGPU>
</matButiAlg>
<flareEnhance>
<flareEnhanceEnable> 1 </flareEnhanceEnable> <!-- 0:disable, 1 enable -->
<degammaEnhanceEnable> 1 </degammaEnhanceEnable> <!-- 0:disable, 1 enable -->
<degammaCoef> 1.5 </degammaCoef>
<degammaQuantGain> 100 </degammaQuantGain>
<erodeEnable> 0 </erodeEnable> <!-- 0:disable, 1 enable -->
</flareEnhance>
</AlgorithmRFInfo>
<ExternConfig>
<packDispRefMatImg>0</packDispRefMatImg> <!-- 是否存储中间数据结果 dxo open, product close-->
</ExternConfig>
</Config>
|