Pārlūkot izejas kodu

新活检:人脸晃出摄像头放松

Michael Wang 5 gadi atpakaļ
vecāks
revīzija
7f0292f206

+ 3 - 1
src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue

@@ -590,7 +590,7 @@ export default {
         }
         if (
           this.singleFaceFailedTimes >= 3 &&
-          this.singleFaceFailedTimes / this.totalDetectTimes >= 0.2
+          this.singleFaceFailedTimes / this.totalDetectTimes >= 0.4
         ) {
           this.corFinalResult.result = false;
           this.corFinalResult.waggleOutCamera = true;
@@ -703,6 +703,8 @@ export default {
               this.doneCompare = true;
               if (this.compareResult.isPass && !this.compareResult.isStranger) {
                 console.log("人脸同步比对成功");
+                // 初始化晃出摄像头次数
+                this.singleFaceFailedTimes = 0;
                 if (!this.instructionsFinished && this.currentStep)
                   this.currentStep.finished = true;
               } else {