rk
昨天 4a8ff39b0fab0627ef8f7459587d514cc01c3676
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
package com.doumee.keyCabinet.utils.face.model;
 
/**
 * author : shangrong
 * date : 2019/5/22 9:10 PM
 * description :配置文件
 */
public class BaseConfig {
    // 设备通信密码
    private String dPass = "";
    // RGB检测帧回显
    private Boolean display = true;
    // RGB预览Y轴转向falese为0,true为180
    private Boolean rgbRevert = true;
    // NIR或depth实时视频预览
    private Boolean isNirOrDepth = true;
    // 默认为false。可选项为"true"、"false",是否开启调试显示,将会作用到所有视频流识别页面,包含1:N、1:1采集人脸图片环节。
    private boolean debug = false;
    // 默认为wireframe。可选项为"wireframe"、"fixedarea",如选择fixed_area,需要传入半径,px像素为单位
    private String detectFrame = "wireframe";
    // 当选择fixed_area,需要传入半径信息,以px为单位,如50px
//    private int radius = 50;
    // 默认为max。分为"max" 、"none"三个方式,分别是最大人脸 ,和不检测人脸
    private String trackType = "max";
    // 默认为80px。可传入大于50px的数值,小于此大小的人脸不予检测
    private int minimumFace = 60;
    // 人脸置信度用于表征被检测到的物体是人脸的概率,该阈值设置越高检测越严格,建议在0.3-0.8区间内调整阈值
    private float faceThreshold = 0.3f;
    // 模糊度设置,默认0.5。取值范围[0~1],0是最清晰,1是最模糊
    private float blur = 0.9f;
    // 光照设置,默认0.8.取值范围[0~1], 数值越大,光线越强
    private float illum = 0.8f;
    // 姿态阈值
    private float gesture = 15;
    // 三维旋转之俯仰角度[-90(上), 90(下)],默认20
    private float pitch = 30;
    // 平面内旋转角[-180(逆时针), 180(顺时针)],默认20
    private float roll = 30;
    // 三维旋转之左右旋转角[-90(左), 90(右)],默认20
    private float yaw = 30;
    // 遮挡阈值
    private float occlusion = 0.6f;
    // 左眼被遮挡的阈值,默认0.6
    private float leftEye = 0.6f;
    // 右眼被遮挡的阈值,默认0.6
    private float rightEye = 0.6f;
    // 鼻子被遮挡的阈值,默认0.7
    private float nose = 0.8f;
    // 嘴巴被遮挡的阈值,默认0.7
    private float mouth = 0.8f;
    // 左脸颊被遮挡的阈值,默认0.8
    private float leftCheek = 0.8f;
    // 右脸颊被遮挡的阈值,默认0.8
    private float rightCheek = 0.8f;
    // 下巴被遮挡阈值,默认为0.6
    private float chinContour = 0.8f;
    // 人脸完整度,默认为1。0为人脸溢出图像边界,1为人脸都在图像边界内
    private float completeness = 0.9f;
    // 识别阈值,0-100,默认为80分,需要选择具体模型的阈值。live:80、idcard:80
    private float liveScoreThreshold = 0.6f;
    // 识别阈值,0-100,默认为80分,需要选择具体模型的阈值。live:80、idcard:80
    private float idScoreThreshold = 0.6f;
    // 识别阈值,0-100,默认为80分,需要选择具体模型的阈值。live:80、idcard:80
    private float rgbAndNirScoreThreshold = 0.6f;
    // 模态切换光线阈值
    private int cameraLightThreshold = 50;
    // 使用的特征抽取模型默认为生活照:1;证件照:2;RGB+NIR混合模态模型:3;
    private int activeModel = 1;
    // 识别结果出来后的演示展示,默认为0ms
    private int timeLapse = 0;
    // 不使用活体: 0
    // RGB活体:1
    // RGB+NIR活体:2
    // RGB+Depth活体:3
    // RGB+NIR+Depth活体:4
    private int type = 1;
    // 是否开启质量检测开关
    private boolean qualityControl = true;
    // 是否开启活体检测开关
    private boolean livingControl = false;
    // RGB活体阀值
    private float rgbLiveScore = 0.80f;
    // NIR活体阀值
    private float nirLiveScore = 0.80f;
    // Depth活体阀值
    private float depthLiveScore = 0.80f;
    // 是否开启暗光恢复
    private boolean darkEnhance = false;
    // 是否开启best image
    private boolean bestImage = true;
    // 是否开启Log日志
    private boolean log = true;
    // 摄像头显示位置
    private int rbgCameraId = -1;
 
    // 是否开启openGL渲染 (建议开启后设置为640*480分辨率)
    private boolean isOpenGl = false;
 
    public boolean isOpenGl() {
        return isOpenGl;
    }
 
    public void setOpenGl(boolean openGl) {
        isOpenGl = openGl;
    }
 
    public int getRBGCameraId() {
        return rbgCameraId;
    }
 
    public void setRBGCameraId(int rbgCameraId) {
        this.rbgCameraId = rbgCameraId;
    }
 
    public boolean isLog() {
        return log;
    }
 
    public void setLog(boolean log) {
        this.log = log;
    }
 
    public boolean isBestImage() {
        return bestImage;
    }
 
    public void setBestImage(boolean bestImage) {
        this.bestImage = bestImage;
    }
    public boolean isDarkEnhance() {
        return darkEnhance;
    }
 
    public void setDarkEnhance(boolean darkEnhance) {
        this.darkEnhance = darkEnhance;
    }
 
    public int getFramesThreshold() {
        return framesThreshold;
    }
 
    public void setFramesThreshold(int framesThreshold) {
        this.framesThreshold = framesThreshold;
    }
 
    // 帧数阈值
    private int framesThreshold = 3;
 
    // 0:奥比中光海燕、大白(640*400)
    // 1:奥比中光海燕Pro、Atlas(400*640)
    // 2:奥比中光蝴蝶、Astra Pro\Pro S(640*480)
    // 3:舜宇Seeker06
    // 4:螳螂慧视天蝎P1
    // 5:瑞识M720N
    // 6:奥比中光Deeyea(结构光)
    // 7:华捷艾米A100S、A200(结构光)
    // 8:Pico DCAM710(ToF)
    private int cameraType = 0;
 
 
    // 是否开启属性检测
    private boolean attribute = false;
 
    // rgb和nir摄像头宽
    private int rgbAndNirWidth = 640;
    // rgb和nir摄像头高
    private int rgbAndNirHeight = 480;
    // depth摄像头宽
    private int depthWidth = 640;
    // depth摄像头高
    private int depthHeight = 400;
 
    // 是否开启最优人脸检测
    private boolean usingBestImage = false;
    // 最优人脸分数
    private int bestImageScore = 30;
    // 人脸展示角度默认为0。可传入0、90、180、270四个选项。
    private int rgbVideoDirection = 270;
 
    // 默认为0。可传入0、90、180、270四个选项。
    private int nirVideoDirection = 0;
 
    // 0:RGB无镜像,1:有镜像
    private int mirrorVideoRGB = 0;
 
    // 0:Nir无镜像,1:有镜像
    private int mirrorVideoNIR = 0;
 
    // rbg人脸检测角度 默认为0。可传入0、90、180、270四个选项。
    private int rgbDetectDirection = 90;
 
    // nir人脸检测角度 默认为0。可传入0、90、180、270四个选项。
    private int nirDetectDirection = 0;
 
    // rbg人脸检测 0:RGB无镜像,1:有镜像
    private int mirrorDetectRGB = 0;
 
    // nir人脸检测 0:RGB无镜像,1:有镜像
    private int mirrorDetectNIR = 0;
 
    public int getRgbDetectDirection() {
        return rgbDetectDirection;
    }
 
    public void setRgbDetectDirection(int rgbDetectDirection) {
        this.rgbDetectDirection = rgbDetectDirection;
    }
 
    public int getNirDetectDirection() {
        return nirDetectDirection;
    }
 
    public void setNirDetectDirection(int nirDetectDirection) {
        this.nirDetectDirection = nirDetectDirection;
    }
 
    public int getMirrorDetectRGB() {
        return mirrorDetectRGB;
    }
 
    public void setMirrorDetectRGB(int mirrorDetectRGB) {
        this.mirrorDetectRGB = mirrorDetectRGB;
    }
 
    public int getMirrorDetectNIR() {
        return mirrorDetectNIR;
    }
 
    public void setMirrorDetectNIR(int mirrorDetectNIR) {
        this.mirrorDetectNIR = mirrorDetectNIR;
    }
 
    public int getNirVideoDirection() {
        return nirVideoDirection;
    }
 
    public void setNirVideoDirection(int nirVideoDirection) {
        this.nirVideoDirection = nirVideoDirection;
    }
 
    public int getMirrorVideoNIR() {
        return mirrorVideoNIR;
    }
 
    public void setMirrorVideoNIR(int mirrorVideoNIR) {
        this.mirrorVideoNIR = mirrorVideoNIR;
    }
 
    public int getMirrorVideoRGB() {
        return mirrorVideoRGB;
    }
 
    public void setMirrorVideoRGB(int mirrorVideoRGB) {
        this.mirrorVideoRGB = mirrorVideoRGB;
    }
 
    public int getRgbVideoDirection() {
        return rgbVideoDirection;
    }
 
    public void setRgbVideoDirection(int rgbVideoDirection) {
        this.rgbVideoDirection = rgbVideoDirection;
    }
 
    public boolean isUsingBestImage() {
        return usingBestImage;
    }
 
    public void setUsingBestImage(boolean usingBestImage) {
        this.usingBestImage = usingBestImage;
    }
 
    public int getBestImageScore() {
        return bestImageScore;
    }
 
    public void setBestImageScore(int bestImageScore) {
        this.bestImageScore = bestImageScore;
    }
 
    public int getRgbAndNirWidth() {
        return rgbAndNirWidth;
    }
 
    public void setRgbAndNirWidth(int rgbAndNirWidth) {
        this.rgbAndNirWidth = rgbAndNirWidth;
    }
 
    public int getRgbAndNirHeight() {
        return rgbAndNirHeight;
    }
 
    public void setRgbAndNirHeight(int rgbAndNirHeight) {
        this.rgbAndNirHeight = rgbAndNirHeight;
    }
 
    public int getDepthWidth() {
        return depthWidth;
    }
 
    public void setDepthWidth(int depthWidth) {
        this.depthWidth = depthWidth;
    }
 
    public int getDepthHeight() {
        return depthHeight;
    }
 
    public void setDepthHeight(int depthHeight) {
        this.depthHeight = depthHeight;
    }
 
    public int getCameraType() {
        return cameraType;
    }
 
    public void setCameraType(int cameraType) {
        this.cameraType = cameraType;
    }
 
 
    public float getRgbLiveScore() {
        return rgbLiveScore;
    }
 
    public void setRgbLiveScore(float rgbLiveScore) {
        this.rgbLiveScore = rgbLiveScore;
    }
 
    public float getNirLiveScore() {
        return nirLiveScore;
    }
 
    public void setNirLiveScore(float nirLiveScore) {
        this.nirLiveScore = nirLiveScore;
    }
 
    public float getDepthLiveScore() {
        return depthLiveScore;
    }
 
    public void setDepthLiveScore(float depthLiveScore) {
        this.depthLiveScore = depthLiveScore;
    }
 
    public String getdPass() {
        return dPass;
    }
 
    public void setdPass(String dPass) {
        this.dPass = dPass;
    }
 
    public boolean isDebug() {
        return debug;
    }
 
    public void setDebug(boolean debug) {
        this.debug = debug;
    }
 
    public String getDetectFrame() {
        return detectFrame;
    }
 
    public void setDetectFrame(String detectFrame) {
        this.detectFrame = detectFrame;
    }
 
 
    public float getFaceThreshold() {
        return faceThreshold;
    }
 
    public void setFaceThreshold(float faceThreshold) {
        this.faceThreshold = faceThreshold;
    }
 
    public String getTrackType() {
        return trackType;
    }
 
    public void setTrackType(String trackType) {
        this.trackType = trackType;
    }
 
    public int getMinimumFace() {
        return minimumFace;
    }
 
    public void setMinimumFace(int minimumFace) {
        this.minimumFace = minimumFace;
    }
 
    public float getBlur() {
        return blur;
    }
 
    public void setBlur(float blur) {
        this.blur = blur;
    }
 
    public float getIllumination() {
        return illum;
    }
 
    public void setIllumination(float illum) {
        this.illum = illum;
    }
 
    public float getGesture() {
        return gesture;
    }
 
    public void setGesture(float gesture) {
        this.gesture = gesture;
    }
 
    public float getPitch() {
        return pitch;
    }
 
    public void setPitch(float pitch) {
        this.pitch = pitch;
    }
 
    public float getRoll() {
        return roll;
    }
 
    public void setRoll(float roll) {
        this.roll = roll;
    }
 
    public float getYaw() {
        return yaw;
    }
 
    public void setYaw(float yaw) {
        this.yaw = yaw;
    }
 
    public float getOcclusion() {
        return occlusion;
    }
 
    public void setOcclusion(float occlusion) {
        this.occlusion = occlusion;
    }
 
    public float getLeftEye() {
        return leftEye;
    }
 
    public void setLeftEye(float leftEye) {
        this.leftEye = leftEye;
    }
 
    public float getRightEye() {
        return rightEye;
    }
 
    public void setRightEye(float rightEye) {
        this.rightEye = rightEye;
    }
 
    public float getNose() {
        return nose;
    }
 
    public void setNose(float nose) {
        this.nose = nose;
    }
 
    public float getMouth() {
        return mouth;
    }
 
    public void setMouth(float mouth) {
        this.mouth = mouth;
    }
 
    public float getLeftCheek() {
        return leftCheek;
    }
 
    public void setLeftCheek(float leftCheek) {
        this.leftCheek = leftCheek;
    }
 
    public float getRightCheek() {
        return rightCheek;
    }
 
    public void setRightCheek(float rightCheek) {
        this.rightCheek = rightCheek;
    }
 
    public float getChinContour() {
        return chinContour;
    }
 
    public void setChinContour(float chinContour) {
        this.chinContour = chinContour;
    }
 
    public float getCompleteness() {
        return completeness;
    }
 
    public void setCompleteness(float completeness) {
        this.completeness = completeness;
    }
 
    public float getLiveThreshold() {
        return liveScoreThreshold;
    }
 
    public void setLiveThreshold(float liveScoreThreshold) {
        this.liveScoreThreshold = liveScoreThreshold;
    }
 
    public float getIdThreshold() {
        return idScoreThreshold;
    }
 
    public void setIdThreshold(float idScoreThreshold) {
        this.idScoreThreshold = idScoreThreshold;
    }
 
    public int getActiveModel() {
        return activeModel;
    }
 
    public void setActiveModel(int activeModel) {
        this.activeModel = activeModel;
    }
 
    public int getTimeLapse() {
        return timeLapse;
    }
 
    public void setTimeLapse(int timeLapse) {
        this.timeLapse = timeLapse;
    }
 
    public int getType() {
        return type;
    }
 
    public void setType(int type) {
        this.type = type;
    }
 
    public boolean isQualityControl() {
        return qualityControl;
    }
 
    public void setQualityControl(boolean qualityControl) {
        this.qualityControl = qualityControl;
    }
 
    public Boolean getDisplay() {
        return display;
    }
 
    public void setDisplay(Boolean display) {
        this.display = display;
    }
 
    public Boolean getNirOrDepth() {
        return isNirOrDepth;
    }
 
    public void setNirOrDepth(Boolean nirOrDepth) {
        isNirOrDepth = nirOrDepth;
    }
 
 
    public Boolean getRgbRevert() {
        return rgbRevert;
    }
 
    public void setRgbRevert(Boolean rgbRevert) {
        this.rgbRevert = rgbRevert;
    }
 
 
    public boolean isAttribute() {
        return attribute;
    }
 
    public void setAttribute(boolean attribute) {
        this.attribute = attribute;
    }
 
    public boolean isLivingControl() {
        return livingControl;
    }
 
    public void setLivingControl(boolean livingControl) {
        this.livingControl = livingControl;
    }
 
    public int getCameraLightThreshold() {
        return cameraLightThreshold;
    }
 
    public void setCameraLightThreshold(int cameraLightThreshold) {
        this.cameraLightThreshold = cameraLightThreshold;
    }
 
    public float getRgbAndNirThreshold() {
        return rgbAndNirScoreThreshold;
    }
 
    public void setRgbAndNirThreshold(float rgbAndNirScoreThreshold) {
        this.rgbAndNirScoreThreshold = rgbAndNirScoreThreshold;
    }
}