From 300442de21cfc710f58b5f4575cf2b4306fdcecc Mon Sep 17 00:00:00 2001 From: "lkh14011424@gmail.com" Date: Sat, 28 Sep 2024 00:12:07 +0900 Subject: [PATCH] =?UTF-8?q?[feat/#46]=20=EA=BC=AC=EB=A6=AC=EB=BC=88=20?= =?UTF-8?q?=EC=95=89=EA=B8=B0=20=EA=B0=90=EB=8F=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/detector.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/utils/detector.ts b/src/utils/detector.ts index 9c37a81..494c488 100644 --- a/src/utils/detector.ts +++ b/src/utils/detector.ts @@ -315,15 +315,11 @@ export const detectTailboneSit = (refer: pose[], comp: pose[]): boolean | null = // 귀의 중점 계산 const compShoulderMidpoint = getMidPoint(compLeftShoulder, compRightShoulder) - const referRatio = referEarDistance / referShoulderDistance - const compRatio = compEarDistance / compShoulderDistance - if ( - compShoulderDistance / referShoulderDistance < 0.9 && - compEarDistance / referEarDistance < 0.9 && + compShoulderDistance / referShoulderDistance < 0.97 && + compEarDistance / referEarDistance < 0.97 && referShoulderMidpoint.y < compShoulderMidpoint.y && - referEarMidpoint.y < compEarMidpoint.y && - Math.abs(referRatio - compRatio) > 0.015 + referEarMidpoint.y < compEarMidpoint.y ) { return true } else {