- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a F200 camera and I used it to capture a picture of a scene.
Now I want to render the scene using 3rd lib such as OpenGL.
I am not sure if the following way works.
1. I think F200 can give me 3D world coordinates of the scene (vertex coordinate) (not sure if F200 can do this)
2. Take the 2D image as a texture
3. Use OpenGL to render the scene using texture mapping
I am not sure if the above method works.
Thanks.
Xin
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can do this.
Get the raw streams, depth and color. Then, you can project one onto the other to match the view of the cameras. You can get the X, Y, Z positions using the queryvertices method of the RealSense SDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, samontab.
I am not clear about "project one onto the other to match the view of the cameras".
Would you please explain more?
BTW, does the RealSense SDK provide a method to query the projected pixel location for a vertex, i.e. the texture coordinate, so I can use texture mapping.
Do you know how does the result looks like using texture mapping? I need the result quite real, in another word, quite similar with the 2D camera image.
Thanks a lot.
Xin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2.6.2 Coordinates Mapping
Example 31: Map Depth to Color Coordinates using UV Mapping
C++
// Create the PXCProjection instance.
PXCProjection *projection=device->CreateProjection();
// color and depth image size.
PXCImage::ImageInfo dinfo=depth->QueryInfo();
PXCImage::ImageInfo cinfo=color->QueryInfo();
// Calculate the UV map.
PXCPointF32 *uvmap=new PXCPointF32[dinfo.width*dinfo.height];
projection->QueryUVMap(depth, uvmap);
// Translate depth points uv[] to color ij[]
for (int i=0;i<npoints;i++) {
ij.x=uvmap[(int)uv.y*dinfo.width+(int)uv.x].x*cinfo.width;
ij.y=uvmap[(int)uv.y*dinfo.width+(int)uv.x].y*cinfo.height;
}
// Clean up
delete[] uvmap;
projection->Release();

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