How to get real world coordinates (x, y, z) from a distinct object using a Kinect

23,311

You would need to use both the Color Stream and the Depth Stream.

First, using the Color Stream you would need to collect an array of pixels that match the color you are looking for and then lookup the depth data from the Depth Stream for those pixels to get an average distance from the camera. That gives you the Z.

To get the X and Y you would use the math from this answer.

Share:
23,311
Admin
Author by

Admin

Updated on July 16, 2022

Comments

  • Admin
    Admin almost 2 years

    I have to get the real world coordinates (x, y, z) using Kinect. Actually, I want the x, y, z distance (in meters) from Kinect. I have to get these coordinates from a unique object (e.g. a little yellow box) in the scenario, colored in a distinct color.

    Here you can see an example of the scenario

    enter image description here

    I want the distance (x, y, z in meters) of the yellow object in the shelf.

    Note that is not required a person (skeleton) in the scenario.

    First of all, I would like to know if it is possible and simple to do? So, I would appreciate if you send some links/code that could help me doing this task.

  • Aly
    Aly almost 11 years
    Could you add the math to the answer?