- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi folks,
I am learning how to use the SDK for R200 and I am trying to obtain 3D world coordinates.
I got how to use QueryVertices() function from a depth image, but I would like to map color coordinates with depth coordinates to correctly parse pixels in my image. Following the Projection sample, I am going to use ColorToDepth(), but I am missing the vector of color coordinates and I don't know how to construct from the PXCImage sample->color. Based on my knowledge of images as matrices in MatLab, I was thinking of creating a vector by concatenating over columns, isn't it?
Thank you in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ColorToDepth does not need the color image but the color x, y values. It requires the depth image from the camera (which contains the depth data as well as the camera calibration parameters.) Did I answer your question? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey David, that sounds interesting!
So, the depth image produced by the camera not only contains the depth information, but also the camera calibration parameters? I didn't know that! I assumed those parameters were unavailable at the library level.
Where are these parameters stored? in the image metadata? Do you have any pointer for more information on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alessio,
You need to pass the ColourToDepth projection an array of points you're interested in, so if you only want to know about a single point you can pass it an array containing that one point; or if you want to project the whole colour image you'll have to loop through all pixels in the colour image and construct an array containing each point (ie, for x = 0 to width, for y = 0 to height, array.push(x,y)). Beware though, projecting each pixel in a 640*480 image takes over 60 seconds to process on my PC - if you're using a higher res image this will take even longer.You may be better off singly projecting each point as you need it.
Hope this helps!
James
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page