I have Intel RealSense Camera F200,Object is placed around 1/2 meter distance from camera.
I am able to get the depth value via using "PIXEL_FORMAT_DEPTH_F32".
sts = senseMgr.AcquireFrame(true);
if (sts == pxcmStatus.PXCM_STATUS_NO_ERROR)
PXCMCapture.Sample sample = senseMgr.QuerySample();
if (sample.depth != null)
PXCMImage.ImageData dData = new PXCMImage.ImageData();
System.out.println ("Failed to AcquireAccess of depth image data");
int dBuff = new int[dData.pitches/4 * dHeight];
The values which i am getting is of order 10 example:-"1136884736"
How to relate this value with real world value? As camera is only at a distance of 1/2 meter from the object.
If you use PIXEL_FORMAT_DEPTH_F32, the depth map data in 32-bit floating point. The value precision is in millimeters. Looks like the value you got is not the right one. Please found our sample C# code @C:\Program Files (x86)\Intel\RSSDK\framework\CSharp\DF_RawStreams.cs. Thanks!
You are converting a float32 to an int. Of course it will come out incorrect. Try reading the values in as floats and when you print to stdout, also make sure the formatting is for %f (so the value is printed as a float not interpreted as an int)
himanshu p. wrote:
thanks for your prompt reply kyran......we got the code running based on your comment.....
Great! Glad I could help. I am new to this forum, and what is funny is I can't even get my SDK to install yet!