summaryrefstree
path: root/odm/etc/camera/wideAperture/config/dual_lave_platformconfig.xml
blob: 1c2ee1cfd7f5b4ce634824ef2fc1b08051714fbf (plain)
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?xml version="1.0" encoding="utf-8"?>
<Config>
    <Global>
        <FrontCamera>0</FrontCamera> <!-- 前置开关,前置设1,后置设0 -->
        <HDCCalibW>3968</HDCCalibW> <!-- v600字节标定没有存分辨率,需要指定 -->
        <HDCCalibH>2976</HDCCalibH>
        <MainCameraID1>2</MainCameraID1> <!-- 双目第一组模组送显对应的cameraID-->
        <MainCameraID2>8</MainCameraID2> <!-- 双目第二组模组送显对应的cameraID-->
        <CameraID2FocalLengthFactor>2</CameraID2FocalLengthFactor> <!-- 视差转深度 fb 需要除以该系数(tele 镜头) 得到相对深度-->
        <FirstEnableDualRectification>0</FirstEnableDualRectification> <!-- w+uw双摄斜放适配标志位-->
        <SecondEnableDualRectification>0</SecondEnableDualRectification> <!-- tele+w双摄斜放适配标志位-->
        <TeleBaseZoomRatio>2.5</TeleBaseZoomRatio> <!-- tele基础倍率-->
        <FirstKRatio>0</FirstKRatio>
        <SecondKRatio>2.526923076923077</SecondKRatio>
        <EnableOis>1</EnableOis>
        <IsCropWHUpdateByZoom>1</IsCropWHUpdateByZoom> <!-- 主辅路cropWH是否根据zoom做适配,目前FCP、ELP已适配-->
    </Global>

    <AlgorithmPreprocessInfo>
        <distortionAlg enable="1">
            <brownEnable>1</brownEnable>        <!-- 0: disable 1: enable -->
            <bsplineEnable>1</bsplineEnable>    <!-- 0: disable 1: enable -->
        </distortionAlg>

        <OTPRectifyEnable>1</OTPRectifyEnable>     <!-- 0: disable 1: enable -->
        <subLargeFovCropEnable>1</subLargeFovCropEnable>
        <selfLearnAlg enable="1">           <!-- 0: disable 1: enable -->
            <!-- todo -->
        </selfLearnAlg>
        <OisConfigPath>/odm/etc/camera/wideAperture/config/param_pq.xml</OisConfigPath>

        <brightnessColorAdjustEnable>1</brightnessColorAdjustEnable>
        <brightnessGrayAdajustEnable>1</brightnessGrayAdajustEnable>
        <onlineDistortionEnable>1</onlineDistortionEnable>
        <multipleOf8Enable>1</multipleOf8Enable>   <!-- 输入图宽高非8字节对齐校正,仅HL手机开启-->

        <motionPortraitSpeedThresh>2.0</motionPortraitSpeedThresh>   <!-- 抓拍下,区分静止&运动慢 与 运动较快 的阈值速度-->
        <selflearnInputWidth>912</selflearnInputWidth>   <!-- 动态矫正resize固定宽-->
        <selflearnInputHeight>684</selflearnInputHeight>   <!-- 动态矫正resize固定高-->
        <PWSpeedJudgeFlag>0</PWSpeedJudgeFlag>   <!-- 人像大光圈下,判断过快逃生标志位-->
        <PWSpeedJudgeThresh>2.0</PWSpeedJudgeThresh>   <!-- 人像大光圈下,判断过快逃生的速度阈值-->

        <negDispCompensateThresh>25</negDispCompensateThresh>    <!-- 最大负视差补偿值-->
        <matchNumThresh>600</matchNumThresh>
        <nameFeaturePoint>/vendor/etc/camera/dcamera/cherry_feature.bin</nameFeaturePoint>

    </AlgorithmPreprocessInfo>

    <AlgorithmPreView>
        <OrbWarpBindBigCoreEnable>0</OrbWarpBindBigCoreEnable>
        <OrbWarpEnable>1</OrbWarpEnable>
    </AlgorithmPreView>

    <NetParamSet>
        <depthModelFreq>0</depthModelFreq>
        <fingerDetFreq>4</fingerDetFreq>
        <fingerSegFreq>4</fingerSegFreq>
        <hairMattingFreq>4</hairMattingFreq>
        <hairRefFreq>4</hairRefFreq>

        <depthModelPrio>0</depthModelPrio>
        <fingerDetPrio>1</fingerDetPrio>
        <fingerSegPrio>1</fingerSegPrio>
        <hairMattingPrio>1</hairMattingPrio>
        <hairRefPrio>1</hairRefPrio>
    </NetParamSet>

    <AlgorithmDCInfo>
        <SyncNetTime enable="1">
        </SyncNetTime>

        <portraitSegmentAlg enable="1">     <!-- 0: disable 1: enable -->
            <modelWidth>451</modelWidth>
            <modelHeight>451</modelHeight>
            <modelPath>/vendor/etc/camera/cnnmodel/dualcamera/DualCamera_BC_PortraitSeg.om</modelPath>
        </portraitSegmentAlg>

        <mattingAlg enable="1">     <!-- 0: disable 1: enable -->
            <modelWidth>768</modelWidth>
            <modelHeight>768</modelHeight>
            <modelPath>/odm/etc/camera/wideAperture/cnnmodel/HairMattingModel.bin</modelPath>
        </mattingAlg>

        <FirstAIDepthAlg enable="1">
            <modelWidth>912</modelWidth>
            <modelHeight>688</modelHeight>
            <modelPath>/odm/etc/camera/wideAperture/cnnmodel/depthModel_H.bin</modelPath>
            <dualOutputEnable>1</dualOutputEnable>
        </FirstAIDepthAlg>

        <SecondAIDepthAlg enable="1">  <!-- 0: disable 1: enable -->
            <modelWidth>912</modelWidth>
            <modelHeight>688</modelHeight>
            <modelPath>/odm/etc/camera/wideAperture/cnnmodel/depthModel_O.bin</modelPath>
            <dualOutputEnable>1</dualOutputEnable>
        </SecondAIDepthAlg>

        <HMonoDepthAlg enable="1">
            <modelWidth>1024</modelWidth>
            <modelHeight>768</modelHeight>
            <modelPath>/odm/etc/camera/wideAperture/cnnmodel/MonoDepthModelH.bin</modelPath>
        </HMonoDepthAlg>

        <VMonoDepthAlg enable="1">
            <modelWidth>768</modelWidth>
            <modelHeight>1024</modelHeight>
            <modelPath>/odm/etc/camera/wideAperture/cnnmodel/MonoDepthModelV.bin</modelPath>
        </VMonoDepthAlg>

        <fovCropAlgCfg enable="1">
            <fullScreenScaleRatio>0.05</fullScreenScaleRatio>
            <nonFullScreenScaleRatio>0.05</nonFullScreenScaleRatio>
            <rightFullScreenFovWidthCoef>0.50</rightFullScreenFovWidthCoef>
            <rightFullScreenFovHeightCoef>0.50</rightFullScreenFovHeightCoef>
        </fovCropAlgCfg>

        <sparseDispAlg enable="1">          <!-- 0: disable 1: enable -->
            <DCEAlg enable="0">
                <baseConfig>
                    <ratio>1</ratio>    <!-- {1, 2} output resolution width/ratio-->
                    <lrcheckEnable>0</lrcheckEnable>
                </baseConfig>
                <externConfig enable="0">
                    <lrcheckEnable> 0 </lrcheckEnable>
                </externConfig>
            </DCEAlg>
            <DMAPAlg enable="1">
                <dmapVersion>4</dmapVersion>     <!--0:v150, 1:v160, 2:v200, 3:v250, 4:v300... 15:unknown-->
                <baseConfig>
                    <lrcheckEnable>1</lrcheckEnable>
                </baseConfig>
                <externConfig enable="1">
                    <lrcheckEnable>0</lrcheckEnable>
                </externConfig>
            </DMAPAlg>

            <sparseOptAlg>
                <occOptEnable>1</occOptEnable>           <!-- 0: disable 1: enable -->
                <eyesOptEnable>1</eyesOptEnable>
                <blackFillEnable>0</blackFillEnable>    <!-- 0: disable 1: enable -->
                <skyOptEnable>1</skyOptEnable>          <!-- 0: disable 1: enable -->
                <subPixelsEnable>0</subPixelsEnable>    <!-- hl always close -->
                <portraitMaskOptInterEnable>1</portraitMaskOptInterEnable>
                <portraitMaskOptOuterEnable>0</portraitMaskOptOuterEnable>
                <portraitMaskOptHoleEnable>1</portraitMaskOptHoleEnable>
                <adpaptWithTofEnable>1</adpaptWithTofEnable>
                <fillWithSparseSegEnable>1</fillWithSparseSegEnable>
            </sparseOptAlg>
        </sparseDispAlg>

        <denseDispAlg>
            <opticalFlowAlg>
                <ratio>1</ratio>                  <!-- {1, 2} output resolution width/ratio-->
                <occEnable>1</occEnable>            <!-- 0: disable 1: enable -->
                <headOptInterEnable>1</headOptInterEnable>    <!-- 0: disable 1: enable -->
                <headOptOuterEnable>0</headOptOuterEnable>    <!-- 0: disable 1: enable -->
            </opticalFlowAlg>

            <adaptureEnableHair>1</adaptureEnableHair>
            <adaptureEnableHairSuper>1</adaptureEnableHairSuper>

            <denseOptAlg>
                <fingerEnable>4</fingerEnable>            <!-- 0: disable 1 & other: Tradition, 2: Tradition & CNN, 3: CNN & Tradition, 4: CNN  -->
                <fingerModelPath>/odm/etc/camera/wideAperture/cnnmodel/fingerDetectionModel.bin</fingerModelPath>
                <fingerSegModelPath>/odm/etc/camera/wideAperture/cnnmodel/fingerSegModel.bin</fingerSegModelPath>
                <chartSegModelPath>/odm/etc/camera/wideAperture/cnnmodel/chartSegModel.bin</chartSegModelPath>
                <deburrEnable>1</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场景多镂空时非人像稠密度阈值 -->
                <SuperPortraitSwitch>1</SuperPortraitSwitch>                   <!-- 超级人像开关 -->
                <SPmodifyDispEnable>0</SPmodifyDispEnable>                   <!-- 超级人像修改视差开关 -->
                <SsimCoefThreshlod>0.64</SsimCoefThreshlod>                   <!-- 超级人像判断简单场景的ssim的阈值 -->
                <MattingDetectThres>0.996</MattingDetectThres>                   <!-- 超级人像场景检测网络阈值 -->
                <SsimVeryDifficultRatio>0.7</SsimVeryDifficultRatio>                   <!-- 超级人像ssim的难点占比阈值 -->
                <MattingExtendNumTh>4000</MattingExtendNumTh>                   <!-- 超级人像不同深度错点绝对值阈值 -->
                <railOptEnable>1</railOptEnable>    <!-- 0: disable 1: enable -->
            </denseOptAlg>
        </denseDispAlg>
    </AlgorithmDCInfo>

    <AlgorithmRFInfo>
        <frontFilterEnable>1</frontFilterEnable>        <!-- 0: disable 1: enable -->
        <edgeFilterEnable>1</edgeFilterEnable>          <!-- 0: disable 1: enable -->
        <blurEnhanceRatio>1.0</blurEnhanceRatio>                      <!--  [0.5, 2.0] -->
        <dofEnhanceRatio>1.0</dofEnhanceRatio>                       <!--  [0.5, 5.0] -->
        <spotTh>220</spotTh>                            <!--  [80, 255] -->
        <spotBrightnessEnhanceRatio>1.0</spotBrightnessEnhanceRatio>        <!--  [0.5, 5.0] -->
        <errorSpotOptEnable>1</errorSpotOptEnable>        <!-- 错误光斑检测-->
        <portraitBlurEnhanceRatio>1.0</portraitBlurEnhanceRatio>      <!--  [0.5, 2.0] -->
        <spotEnhanceEnable>1</spotEnhanceEnable>

        <recomdMaxDistJudgeKey>0</recomdMaxDistJudgeKey>
        <recomdMaxDistJudgeOneX>50000</recomdMaxDistJudgeOneX>
        <recomdMaxDistJudgeTwoX>50000</recomdMaxDistJudgeTwoX>
        <recomdMaxDistJudgeTwohalfX>50000</recomdMaxDistJudgeTwohalfX>
        <recomdMaxDistJudgeFiveX>50000</recomdMaxDistJudgeFiveX>
        <lowLightConnectAreaThRatio>70</lowLightConnectAreaThRatio>
        <outSideCircleConnectAreaThRatio>20</outSideCircleConnectAreaThRatio>
        <outSideOtherConnectAreaThRatio>40</outSideOtherConnectAreaThRatio>
        <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 -->
        <dofEnhanceRatioAdaptiveEnabel>0</dofEnhanceRatioAdaptiveEnabel> <!--dof系数自适应-->
        <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> <!--主体离得远时虚化增强使能-->
        <optBlurStypeEnable>1</optBlurStypeEnable> <!--虚化风格-->
        <focusEdgeProcessEnable>1</focusEdgeProcessEnable> <!--对焦主体边缘处理-->
        <flaresColorOptEnable>0</flaresColorOptEnable> <!--光斑色彩优化-->
        <flaresColorOptCoef>25</flaresColorOptCoef> <!--光斑颜色饱和度系数[10~35]-->
        <flaresBrightnessCoef>18</flaresBrightnessCoef> <!--光斑亮度系数[1~25]-->
        <flareOptUseMefImg>1</flareOptUseMefImg> <!--是否使用mef图优化光斑的开关-->
        <alphaEdgeSoftEnable>1</alphaEdgeSoftEnable> <!--alpha边缘平滑优化-->
        <perfectBokehEnable>1</perfectBokehEnable> <!--虚化美化处理-->
        <faceBCEnable>0</faceBCEnable> <!--FaceBC-->
        <blurStypeOfWA>1</blurStypeOfWA> <!--大光圈虚化风格控制-->
        <weightCalcUseYEnable>0</weightCalcUseYEnable> <!--权重计算使用Y值-->
        <portraitResetFnumDisable>1</portraitResetFnumDisable> <!--人像模式不改光圈值-->
        <portraitFrontBlurEnable>1</portraitFrontBlurEnable> <!--人像模式前景虚化使能-->
        <matteHairEnhanceDisable>1</matteHairEnhanceDisable> <!--matte导图发丝高频增强置零-->

        <!-- backgroupAdj-->
        <bgadj>
            <contractAdjustEnable> 0 </contractAdjustEnable> <!-- 0:disable, 1 enable -->
            <colorAdjustEnable> 0 </colorAdjustEnable> <!-- 0:disable, 1 enable -->
            <lumaAdjustEnable> 0 </lumaAdjustEnable> <!-- 0:disable, 1 enable -->
            <bfRadius> 32 </bfRadius> <!-- BoxFilter radius-->
            <contractParam> 5 </contractParam>  <!-- Range:[0, 20] -->
            <lumaAdjustGain> -5 </lumaAdjustGain> <!-- Range:[-20, 20] -->
            <colorAdjRatio> 1.2 </colorAdjRatio> <!-- Range:[0.8f, 1.6f] -->
        </bgadj>

        <matButiAlg enable="1">                      <!-- 0: disable 1: enable -->
            <NNUsage>0</NNUsage>
            <DualModel>1</DualModel>                 <!--是否双模型开关-->
            <IsQuantization>1</IsQuantization>       <!--是否量化模型开关-->
            <modelWidth>1024</modelWidth>
            <modelHeight>1024</modelHeight>
            <modelPath>/odm/etc/camera/wideAperture/cnnmodel/HairRefineModel.bin</modelPath>
            <modelSimplePath>/odm/etc/camera/wideAperture/cnnmodel/HairRefineModelSimple.bin</modelSimplePath>
        </matButiAlg>

    </AlgorithmRFInfo>

    <ExternConfig>
        <packDispRefMatImg>0</packDispRefMatImg> <!-- 是否存储中间数据结果 dxo open, product close-->
    </ExternConfig>

    <Settings>  <!-- Phone setting infomation -->
        <ZoomRatioList     value="1.0 2.0 2.5"/>
        <ShallowDepthMINThList value="275 550 1000"/>                 <!-- 浅景深深度阈值min -->
        <ShallowDepthMAXThList value="400 800 1500"/>                <!-- 浅景深深度阈值max -->
        <shallowDofFNumTh>10</shallowDofFNumTh>                       <!-- 浅景深光圈生效阈值 -->
        <shallowDofEnable>1</shallowDofEnable>                       <!-- 浅景深开关 -->
    </Settings>

</Config>