Created
September 23, 2020 09:56
-
-
Save ntakouris/6ca8c9e71c1c811a8be16472d45a3928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function poseHandler(pose) { | |
l_hip = pose.keypoints[11]; | |
r_hip = pose.keypoints[12]; | |
hip = undefined; | |
if (l_hip && !r_hip) { | |
hip = l_hip; | |
}else if (r_hip && !l_hip) { | |
hip = r_hip; | |
}else{ | |
if (l_hip.score > r_hip.score) { | |
hip = l_hip; | |
} else { | |
hip = r_hip; | |
} | |
} | |
if (!hip || hip.score < 0.6) { | |
// no hip found | |
return | |
} | |
// .. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment