drawKeypoints(mlpose = this)  
	{
	
	  mlpose.ctx.fillStyle = 'rgb(255, 0, 0)';
		
	  // Loop through all the poses detected
	  for (let i = 0; i < mlpose.poses.length; i++) {
		  
		// For each pose detected, loop through all the keypoints
		let pose = mlpose.poses[i].pose;
		for (let j = 0; j < pose.keypoints.length; j++) {
			
		  // A keypoint is an object describing a body part (like rightArm or leftShoulder)
		  let keypoint = pose.keypoints[j];

		  // Only draw an ellipse is the pose probability is bigger than 0.2
		  if (keypoint.score > 0.2) {
			mlpose.ctx.beginPath();
			mlpose.ctx.arc(keypoint.position.x, keypoint.position.y, 7, 0, 2 * Math.PI);
			mlpose.ctx.fill();
		  }
		}
	  }
	}
/* 
    * A function to draw ellipses over the detected keypoints
	* @mlpose: MlBody object is passed to the method
    */
A function to draw ellipses over the detected keypoints
@mlpose: MlBody object is passed to the method
A function to draw ellipses over the detected keypoints @mlpose : MlBody object is passed to the method
drawKeypoints(mlpose = this)  
	{
	  mlpose.ctx.fillStyle = 'rgb(255, 0, 0)';
	  for (let i = 0; i < mlpose.poses.length; i++) {
		let pose = mlpose.poses[i].pose;
		for (let j = 0; j < pose.keypoints.length; j++) {
		  let keypoint = pose.keypoints[j];
		  if (keypoint.score > 0.2) {
			mlpose.ctx.beginPath();
			mlpose.ctx.arc(keypoint.position.x, keypoint.position.y, 7, 0, 2 * Math.PI);
			mlpose.ctx.fill();
		  }
		}
	  }
	}
drawKeypoints ( mlpose = this ) { mlpose . ctx . fillStyle = 'rgb(255, 0, 0)' ; for ( let i = 0 ; i < mlpose . poses . length ; i ++ ) { let pose = mlpose . poses [ i ] . pose ; for ( let j = 0 ; j < pose . keypoints . length ; j ++ ) { let keypoint = pose . keypoints [ j ] ; if ( keypoint . score > 0.2 ) { mlpose . ctx . beginPath ( ) ; mlpose . ctx . arc ( keypoint . position . x , keypoint . position . y , 7 , 0 , 2 * Math . PI ) ; mlpose . ctx . fill ( ) ; } } } }
A function to draw ellipses over the detected keypoints
 @mlpose: MlBody object is passed to the method
A function to draw ellipses over the detected keypoints @mlpose : MlBody object is passed to the method
// Loop through all the poses detected // For each pose detected, loop through all the 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