Skip to content

Commit

Permalink
[feat/#46] 꼬리뼈 앉기 감도 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lkhoony committed Sep 27, 2024
1 parent c7d5810 commit 300442d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/utils/detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 300442d

Please sign in to comment.