- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any function or opensource that can unproject depth image to camera space or world space?
I want to transform the depth image to point cloud and show on computer.
Thanks for your attention.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A function ProjectDepthToCamera uses for unprojection a cloud of points from depth image to world. "The world coordinates uses the camera coordinate system. The values are in mm." (chapter 6.14.2.8 of sdkmanual).
But if you want to unproject to world whole depth image, make sense to use QueryVertices. "The QueryVertices function calculates the vertices from the depth image. The vertices contain the world coordinates in mm." (chapter 6.14.2.11 of sdkmanual).
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A function ProjectDepthToCamera uses for unprojection a cloud of points from depth image to world. "The world coordinates uses the camera coordinate system. The values are in mm." (chapter 6.14.2.8 of sdkmanual).
But if you want to unproject to world whole depth image, make sense to use QueryVertices. "The QueryVertices function calculates the vertices from the depth image. The vertices contain the world coordinates in mm." (chapter 6.14.2.11 of sdkmanual).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use "QueryVetices" and get result which i want. Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used ProjectDepthToCamera for unprojection a point cloud within a Region of Interest, defined by xbegin, ybegin, width and height as follows,
but I do not get a dense 3Dpoints for a scene, where my face is at a distance of 50cm.
I really do not know, if my code is wrong? or F200 provides no dense 3Dpoints. Could you please help me? Thanks
bool convertDepthToWorldCS(int xbegin, int ybegin, int width, int height)
{
unsigned int xend = xbegin + width;
unsigned int yend = ybegin + height;
unsigned int wxhDepth = width * height;
// create the array of depth coordinates + depth value (posUVZ) within the defined ROI
PXCPoint3DF32* posUVZ = new PXCPoint3DF32[wxhDepth];
pxcU16 *dpixels = (pxcU16*)depth.planes[0];
unsigned int dpitch = depth.pitches[0]/sizeof(pxcU16); /* aligned width */
if (posUVZ)
{
for (unsigned int yy = ybegin, k = 0; yy < yend; yy++)
{
for (unsigned int xx = xbegin; xx < xend; xx++, k++)
{
posUVZ
posUVZ
posUVZ
}
}
}
// convert the array of depth coordinates + depth value (posUVZ) into the world coordinates (pos3D) in mm
PXCPoint3DF32* pos3D = new PXCPoint3DF32[wxhDepth];
if (_projection->ProjectDepthToCamera(wxhDepth, posUVZ, pos3D) < PXC_STATUS_NO_ERROR)
{
delete [] posUVZ;
delete [] pos3D;
return true;
}
delete [] posUVZ;
delete [] pos3D;
return false;
};

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