none
How to get the width and the height of BodyIndex? RRS feed

Answers

  • Thx for answering!

    I want to get the height and the width of a player(just one player).

    I used "BodyIndexDescription.Height" and "BodyIndexDescription.Width"(in pixels) of a demo in ,SDK broswer v2.0(kinect for windows),but it doesn't work.I assumed that the two avriables are constants.

    So how can I get the height and the width of body index.

    I'll appreciate it if you can help me!

    Ok , the only way I can think of is to traverse the body index frame and grab only the pixels that switch from the index of the user you want to any other value and the other way round. That should (in an ideal frame where no voids are inside the player mask) give you the outer pixels, the outline. From then on you only have to check columns or rows about the pixel width or height. But that's , like I asked you before, only in pixels.

    If you want the actual height and width of the user in meters, you'd have to use joints + body index + depth etc etc.  Not an easy or performant way to figure out body metrics. But it depends on what you want to do.

    Also the BodyIndex.FrameDescription is a struct that contains the width and height of the whole body index image. It's not about the user. The same FrameDescription is inside ColorFrame and DepthFrame. It's there so you have the overall width and height of the 2D textures that these Frames can give you and how many bytes per pixels they use.

    Do the above answer your question?

    • Marked as answer by Patten Kuo Friday, December 23, 2016 1:16 AM
    Sunday, November 27, 2016 11:57 AM

All replies

  • Depends on what kind of width and height you mean...In pixels? meters?

    Are you trying to get body metrics for a user?

    Saturday, November 26, 2016 10:58 PM
  • Thx for answering!

    I want to get the height and the width of a player(just one player).

    I used "BodyIndexDescription.Height" and "BodyIndexDescription.Width"(in pixels) of a demo in ,SDK broswer v2.0(kinect for windows),but it doesn't work.I assumed that the two avriables are constants.

    So how can I get the height and the width of body index.

    I'll appreciate it if you can help me!

    Saturday, November 26, 2016 11:37 PM
  • Thx for answering!

    I want to get the height and the width of a player(just one player).

    I used "BodyIndexDescription.Height" and "BodyIndexDescription.Width"(in pixels) of a demo in ,SDK broswer v2.0(kinect for windows),but it doesn't work.I assumed that the two avriables are constants.

    So how can I get the height and the width of body index.

    I'll appreciate it if you can help me!

    Ok , the only way I can think of is to traverse the body index frame and grab only the pixels that switch from the index of the user you want to any other value and the other way round. That should (in an ideal frame where no voids are inside the player mask) give you the outer pixels, the outline. From then on you only have to check columns or rows about the pixel width or height. But that's , like I asked you before, only in pixels.

    If you want the actual height and width of the user in meters, you'd have to use joints + body index + depth etc etc.  Not an easy or performant way to figure out body metrics. But it depends on what you want to do.

    Also the BodyIndex.FrameDescription is a struct that contains the width and height of the whole body index image. It's not about the user. The same FrameDescription is inside ColorFrame and DepthFrame. It's there so you have the overall width and height of the 2D textures that these Frames can give you and how many bytes per pixels they use.

    Do the above answer your question?

    • Marked as answer by Patten Kuo Friday, December 23, 2016 1:16 AM
    Sunday, November 27, 2016 11:57 AM