diff --git a/config.yaml b/config.yaml index 154653e..1db83b9 100644 --- a/config.yaml +++ b/config.yaml @@ -41,7 +41,7 @@ camera: face_detection: frame_interval: 10 # 检测帧间隔(每N帧检测一次) quality_threshold: 10 # 图像质量阈值(Laplacian方差) - min_face_size: 60 # 最小人脸尺寸(像素),越小检测距离越远 + min_face_size: 80 # 最小人脸尺寸(像素),越小检测距离越远 face_present_duration: 2.0 # 持续出现时长(秒)才触发识别 max_yaw: 20.0 # 最大允许的偏航角(度),超过此角度视为侧脸 max_pitch: 20.0 # 最大允许的俯仰角(度),超过此角度视为抬头或低头 diff --git a/face_rec.py b/face_rec.py index 2f9ef08..7a3371d 100644 --- a/face_rec.py +++ b/face_rec.py @@ -1836,7 +1836,7 @@ class FaceRecognitionSystem: center_x = w // 2 center_y = h // 2 # 椭圆参数:中心点、宽半轴、高半轴、旋转角度、起始角度、结束角度 - cv2.ellipse(display_frame, (center_x, center_y), (90, 120), 0, 0, 360, (0, 200, 0), 2) + cv2.ellipse(display_frame, (center_x, center_y), (180, 240), 0, 0, 360, (0, 200, 0), 2) # 添加提示文字(使用中文支持函数) guide_text = "请将脸部对准圆圈内"