Measuring hip length using kinect

346 Views Asked by At

For an app I have to take the measurements of a person. Is there any way to measure the size of his hip from the IR and image data I have ?

1

There are 1 best solutions below

1
On

The depth image stream has an option to mark what pixels belong to each person. You can use that and the position of the hip joint to measure the hip using a simple method: simply start at the hip joint position, and use a loop to move right and left. Once you have the pixels on the depth image that correspond to the edge of the user's silhouette, convert them to world coordinates to get their distance in millimeters. But be warned that you will not get accurate results. Things like clothing and accesories can make the Kinect not detect the user's shape correctly.

To determine if a pixel in the depth frame belongs to a user, take a look at this example from the MSDN (https://msdn.microsoft.com/en-us/library/jj131025.aspx):

private void FindPlayerInDepthPixel(short[] depthFrame)
{
  foreach(short depthPixel in depthFrame)
  {
    int player = depthPixel & DepthImageFrame.PlayerIndexBitmask;
    if (player > 0 && this.skeletonData != null)
    {
      // Found the player at this pixel
      // ...
    }
  }
}