- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to read depth measurement, I tried using sample->depth.
But I can`t figure out the depth format/how to interpret the data.
I'm trying to analyse all the depth for a single frame and find the closest point in the frame.
Any help would be appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ignore any value of 0, and then get the smaller value in the frame. That's the closest point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the following code to print the 250th depth value, but I can`t figure out the unit used to represent the depth.
PXCCapture::Sample *sample = sm->QuerySample(); PXCImage *depthFrame = sample->depth; PXCImage::ImageData imgData = {}; unsigned short* points_buf; depthFrame->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_DEPTH_RAW, &imgData); points_buf = (unsigned short*)imgData.planes[0]; if (sample->depth) { pxcCHAR line[256]; swprintf_s<sizeof(line) / sizeof(line[0])>(line, L"Depth=%d", points_buf[250]); UpdateStatus(line); } /* Resume next frame processing */ sm->ReleaseFrame();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That format is device specific. Try using either PIXEL_FORMAT_DEPTH or PIXEL_FORMAT_DEPTH_F32. Those are in mm.
Have a look here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to convert the 16-bit depth data to millimeter.what is the formula? Is that " *0.0001"? Thank you for helping me!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
samontab wrote:
Ignore any value of 0, and then get the smaller value in the frame. That's the closest point.
I want to convert the 16-bit depth data to millimeter.what is the formula? Is that " *0.0001"? R200 /outdoor.Thank you for helping me.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page