browser_client/examples/example3_posenet_skeleton_no_mirror/sketch.js
// And you want to offset one of the skeletons
And you want to offset one of the skeletons
And you want to offset one of the skeletons
function drawKeypoints(pose, clr, offset) {
  for (let j = 0; j < pose.pose.keypoints.length; j++) {
    const keypoint = pose.pose.keypoints[j];
    if (keypoint.score > scoreThreshold) {
      fill(clr);
      noStroke();
      ellipse(
        keypoint.position.x + offset, 
        keypoint.position.y,
        size,
        size,
      );
    }
  }
}
function drawKeypoints ( pose , clr , offset ) { for ( let j = 0 ; j < pose . pose . keypoints . length ; j ++ ) { const keypoint = pose . pose . keypoints [ j ] ; if ( keypoint . score > scoreThreshold ) { fill ( clr ) ; noStroke ( ) ; ellipse ( keypoint . position . x + offset , keypoint . position . y , size , size , ) ; } } }
And you want to offset one of the skeletons
And you want to offset one of the skeletons
// Loop through all keypoints // A keypoint is an object describing a body part (like rightArm or leftShoulder) // Only draw an ellipse is the pose probability is bigger than 0.2 // Offset useful if testing on your own