- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I googled many referece, but couldn't found what I need.
What I want to do is simple.
1. Find target by 2D RGB image, and knowing the target's bounding box in 2D image coordinate.
2. Get the corresponding x-y-z points in camera coordinate inside this bounding box. That is, extract point cloud from 2D RGB information.
I can do step 1 by converting image to cv::mat, and locate the target.
But still don't know how to get the point cloud inside the specific region.
Please help me...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you already have the bounding points in the colour image (i,j), you can use Projection.MapColorToDepth to map those points to the depth image (u,v); then Projection.QueryVertices to get the array of world/camera (x,y,z) coordinates (AKA vertices).
The camera coordinates for colour point (i,j) which maps to depth point (u,v) is then vertices[u + v * depthImage.width].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What James said is correct.
Also, remember that not all points necessarily will have valid depth values, so you need to consider that in your application, and depth data will usually be noisy, so you will need to do some smoothing as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi samontab.
I have the same problem. I like to map de bound box of face to depth x,y,z coordinates. Do you have some example about this ?
Best regards.
Carlos Cubas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
James B. wrote:
If you already have the bounding points in the colour image (i,j), you can use Projection.MapColorToDepth to map those points to the depth image (u,v); then Projection.QueryVertices to get the array of world/camera (x,y,z) coordinates (AKA vertices).
The camera coordinates for colour point (i,j) which maps to depth point (u,v) is then vertices[u + v * depthImage.width].
Hi,James. Is there any precision difference between Projection.QueryVertices and ProjectColorToCamera.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page