From 76ec25ab37f71446f4e212d0cdbc41de83874862 Mon Sep 17 00:00:00 2001 From: G-hoon Date: Fri, 30 Aug 2024 02:18:35 +0900 Subject: [PATCH] =?UTF-8?q?[feat/#32]=20=EB=B9=8C=EB=93=9C=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AnalysisDashboard.tsx | 2 +- src/utils/detector.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/AnalysisDashboard.tsx b/src/pages/AnalysisDashboard.tsx index c231f95..09b8e29 100644 --- a/src/pages/AnalysisDashboard.tsx +++ b/src/pages/AnalysisDashboard.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useEffect } from "react" +import { useState, useRef, useEffect } from "react" import { useQuery } from "@tanstack/react-query" import { getTodayAnalysis, TodayAnalysisData } from "@/api/analysis" import { poseType } from "@/api/pose" diff --git a/src/utils/detector.ts b/src/utils/detector.ts index 358353b..9d3c4a7 100644 --- a/src/utils/detector.ts +++ b/src/utils/detector.ts @@ -280,7 +280,7 @@ export const detectTailboneSit = (refer: pose[], comp: pose[]): boolean | null = const compShoulderDistance = getDistance(compLeftShoulder, compRightShoulder) const compEearsDistance = getDistance(compLeftEar, compRightEar) - // 조건 1: 현재(comp)의 귀 중간 y좌표가 스냅샷(refer)보다 아래에 있고, + // 조건 1: 현재(comp)의 귀 중간 y좌표가 스냅샷(refer)보다 아래에 있고, // 현재(comp)의 어깨 중간 y좌표도 스냅샷(refer)보다 아래에 있는지 확인 const compY = compEarMid.y - referEarMid.y > 20 && compShoulderMid.y - referShoulderMid.y > 20 @@ -290,4 +290,3 @@ export const detectTailboneSit = (refer: pose[], comp: pose[]): boolean | null = // 두 조건을 모두 만족하면 true 반환, 그렇지 않으면 false 반환 return compY && compDistance } -