- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This example is incomplete . I need to know what kind of array type and size is: uv and ij ?
Thanks
// Create the PXCMProjection instance.
PXCMProjection projection=device.CreateProjection();
// color and depth image size.
PXCMImage.ImageInfo dinfo=depth.info;
PXCMImage.ImageInfo cinfo=color.info;
// Calculate the UV map.
PXCMPointF32[] uvmap=new PXCMPointF32[dinfo.width*dinfo.height];
projection.QueryUVMap(depth, uvmap);
// Translate depth points uv[] to color ij[]
for (int i=0;i<uv.Length;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
projection.Dispose();
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think what they're trying to do here is to map a few depth points to colour points. so uv will be an array of PXCMPointF32 points in the depth image that you're interested in, and ij will be the same size and type.
So if you had 3 points of interest in the depth image, you'd set uv and ij to be an array of size 3, then set uv[0] = (a,b), uv[1] = (c,d) and uv[2] = (e,f). Then after you loop through, ij[0] will be the colour coordinates of the point uv[0] etc.
The docs and samples for using projections in C# aren't great unfortunately. I've been working on RealSense stuff for over 6 months and only just managed to get to grips with (some) things, mostly through trial and error.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page