fix(camera): relax pitch and roll acceptance limits

This commit is contained in:
xsl
2026-10-15 21:16:46 +08:00
parent c6d65493b6
commit 49db1a6f5b
4 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -66,11 +66,11 @@
// as side views. These empirical angles are not upstream quality scores.
// 2026-10-15: expand accepted angles by 20%; lower side minimum by 20%.
var FRONT_YAW_MAX = 18;
var FRONT_PITCH_MAX = 21.6;
var FRONT_PITCH_MAX = 26;
var SIDE_YAW_MIN = 24;
var SIDE_YAW_MAX = 84;
var SIDE_PITCH_MAX = 24;
var ROLL_MAX = 18;
var SIDE_PITCH_MAX = 29;
var ROLL_MAX = 22;
var HINT_KEEP = '保持不动';
var HINT_TURN_LEFT = '请向左转头'; // 用户向自己的左侧转
@@ -159,10 +159,10 @@
/**
* check(points, target, mirrored) -> { ok, hint }
* target: 'front' | 'left' | 'right'
* 'front' : |yaw|<=18 且 |pitch|<=21.6、|roll|<=18;角度不合格只提示回正,
* 'front' : |yaw|<=18 且 |pitch|<=26、|roll|<=22;角度不合格只提示回正,
* 不在正脸拍摄完成前播侧脸转头指令。
* 'left' : 画面中看到左脸 = 被摄者头向右转(语义 yaw ∈ [-84°,-24°]),|pitch|<=24
* 'right' : 画面中看到右脸 = 被摄者头向左转(语义 yaw ∈ [24°,84°]),|pitch|<=24
* 'left' : 画面中看到左脸 = 被摄者头向右转(语义 yaw ∈ [-84°,-24°]),|pitch|<=29
* 'right' : 画面中看到右脸 = 被摄者头向左转(语义 yaw ∈ [24°,84°]),|pitch|<=29
* ok=true 时 hint='保持不动';输入非法(含 estimate 返回 null 的退化特征点)时 ok=false、hint='请正对屏幕'。
*/
function check(points, target, mirrored) {