Toggle navigation
Toggle navigation
This project
Loading...
Sign in
한우준
/
Straight-Up
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김원진
2020-12-10 06:05:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fb38ad52539bff6b6ef78e55bccdb8776b8faf7b
fb38ad52
1 parent
37f4308d
analysis function comment change - minute update
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
straight-up/src/AnalysisPose.js
straight-up/src/AnalysisPose.js
View file @
fb38ad5
...
...
@@ -52,13 +52,13 @@ const checkStraight = (resData, position) => { //resData: API로 받은 JSON 객
var
d_right
=
distance
(
x_position
[
ear
+
1
],
y_position
[
ear
+
1
],
x_position
[
shoulder
+
1
],
y_position
[
shoulder
+
1
]);
var
gap
=
difference
(
d_left
,
d_right
);
if
(
gap
>=
20
)
{
//기운 각도가 20
도
를 넘을 경우
if
(
gap
>=
20
)
{
//기운 각도가 20
%
를 넘을 경우
if
(
d_left
>
d_right
)
{
//오른쪽으로 기울인 경우
return
'leaning right by '
+
gap
+
'percent.'
;
}
else
if
(
d_left
<
d_right
)
{
//왼쪽으로 기울인 경우
return
'leaning left by '
+
gap
+
'percent.'
;
}
}
else
{
//기운 각도가 20
도
미만인 경우
}
else
{
//기운 각도가 20
%
미만인 경우
return
'okay'
;
}
...
...
Please
register
or
login
to post a comment