Thanks for reaching out!
You can find the SDK documentation of both functions in the following links:
I'm not aware of other approaches for this in specific, I suggest you to read the documentation and see if they fit your needs.
Thank you for your reply.
According to the spec, the QueryArea should return the Area structure which has width, height and depth data of target object.
However the depth value seems always same as the width value.
Can I get the actual depth by this API?
Is the SDK 2016 R3 applicable for the R200?
According to the release note , the SDK 2016 R3 (188.8.131.524) does not support the R200.
So I'm using the SDK 2016 R2.
I see, can you please give me an example of this behavior? Are you able to share a screenshot of these results?
You are right, the R3 does not apply to the R200, but since I didn't know the camera you were using I simply put the latest version, nevertheless, you can find the documentation of the R2 in the following link:
I attached the screen shot of 3DScan application.
This is based on the sample source of the SDK "DF_3DScan.cs".
I added the code following AcquirePreviewImage() to show the three values obtained from QueryArea().
(every 30 frames)
/* Get Height,Width,Depth of object */
PXCM3DScan.Area scanarea = scan.QueryArea();
if (counter > 30)
var tempheight = scanarea.shape.height * 100.0f; // cm
var tempwidth = scanarea.shape.width * 100.0f; // cm
var tempdepth = scanarea.shape.depth * 100.0f; // cm
form.UpdateValue(tempheight, tempwidth, tempdepth); //Show the values on the main form
counter = 0;
The values are shown at the bottom right of the window (red arrow).
The depth is same as the width almost every time.
(sometimes the least significant digit is different)
In this example, I am capturing the box from the oblique above.
The actual size of the box is H:22cm/ W:8cm/ D:25cm.
How are the values calculated and what size do they indicate?
3dscan.jpg 124.3 K
I have installed R2 and I am ready to test it, nevertheless, I am not able to find where I must insert this snippet in the entire code. Could you please tell me where you added these lines?
Thank you for the files provided.
I tested your code and I got the same values on depth and width. So, I checked the function QueryArea() and I noticed that it gives the scanning area parameters (The green rectangle). Take a look at the SDK documentation: https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?queryarea_pxc3dscan.html
I know that PXCM3DScan.Area gives the scanning volume but I think it doesn't apply in this case.
Regarding the values, they are the height and the width of the scanning area, not of the object.
Have a nice day.
Seeing the sample behavior,the height and the width indicate the actual length of the object.
In the attached 3dScan.jpg, the height of the target box is 23cm, and the API returns 23.34721 as "height".
It does not indicate the vertical length of the green rectangle.
My understanding is:
height: actual height of the object
width: actual width of the object (from fixed angle)
depth: no meaning and should be ignored
Is my understanding right?
I think that it gives the green rectangle parameters, just to make sure move your camera to see if the values change, or if they are the same.
That should confirm if it is the object or the rectangle.
Have a nice day.
The value of height does not change when moving the camera.
It always indicates the actual height of object.
That is correct behavior conforming to the spec, isn't it?
In conclusion, I can get the height and width (from fixed angle) by the QueryArea(),
but cannot get the depth.
Is there any good method to achieve my aim?
I'm aiming to develop the application which shows the 3 dimensional size of the smallest box
that can entirely contain the target object.
I'm not sure if there is a function that can provide all these three parameters. Since usually the camera can measure the height and width of an object and the depth it measures is the distance between the camera and the object.
If you would like to measure the object's width, I believe the best way to do it is to slightly change the angle and then measure this parameter.
I hope this helps.