none
Get Real World Coordinates Tutorial RRS feed

  • Question

  • I am trying to get the real world coordinates of the four corners of an object so that I can get the area of that side of the object. This seems like something that should be simple enough to do, I'm just having a lot of trouble with it.

    I've seen lots of questions referring to a method to get the distance via the skeleton viewer type stuff. However, this is not going to be a skeleton, so I can't figure out how to apply it the same way. What I really need is a tutorial about how to do this? I haven't been able to find much that I actually understand through Googling it. Everything seems to be directed to people who already know a lot about programming for the Kinect.

    Any help would be greatly appreciated.

    Monday, October 28, 2013 4:21 PM

Answers

  • if you have an x/y offset into the DepthImagePixel[] depthPixel array you have to account for the width of the array:

    short depth = this.depthPixels[y * this.sensor.DepthStream.FrameWidth + x].Depth;


    Carmine Sirignano - MSFT

    Tuesday, October 29, 2013 4:58 PM

All replies

  • Any type of shape or object recognition is not provided by the SDK. You will need to use a third party computer vision library that can using depth and color streams to do that for you. The SDK will only provide the raw data like a depth frame of what the camera can see.

    If you parse the raw depth stream, you can determine the distance for a particular point by referencing its x/y offset in the image and map it to the Skeleton coordinate system.


    Carmine Sirignano - MSFT


    Monday, October 28, 2013 5:50 PM
  • How can I reference it's x/y offset?

    Using the DepthBasics-WPF example, I have the depthPixels array. I can get the XY coordinates of a mouse click, for example. Referencing the depth of the actual pixel from there, doesn't seem to be depthPixels[(X + Y)].Depth though, unless I'm mistaken.

    Monday, October 28, 2013 11:14 PM
  • if you have an x/y offset into the DepthImagePixel[] depthPixel array you have to account for the width of the array:

    short depth = this.depthPixels[y * this.sensor.DepthStream.FrameWidth + x].Depth;


    Carmine Sirignano - MSFT

    Tuesday, October 29, 2013 4:58 PM