Items with no label
3335 Discussions

Getting Depth Position Value from Depth Image RealSense SR300

idata
Employee
2,180 Views

Hi,

Right now I am working on a project measuring the depth accuracy of RealSense SR300.Thus I need to obtain the world position of depth for every pixel in the depth image.

I use "projection->QueryVertices(depthIm, &vertices[0])" in the SDK to get the depth value, however, when I compared the data with the one from "JointData.positionWorld.z", the values are different and sometimes they differed a lot. Do you guys meet the same problems before?

PS: I am assuming the data from "JointData.positionWorld.z" are more accurate and I am comparing "vertices[pos].z" with that value where "pos" is "(JointData.positionImage.y - 1)*depth_info.width + (JointData.positionImage.x - 1)".

Best,

Eric

1 Solution
idata
Employee
551 Views

I reduced the data capturing range and the result is good. Problem solved.

View solution in original post

11 Replies
idata
Employee
551 Views

Hi Eric,

 

 

Thank you for your interest in the Intel RealSense Technology. Let us try to help.

 

I'm not sure if I'm correct about this, but it is possible that you're comparing values with different units. JointData.positionWorld, which is the joint position in 3D world coordinates, is expressed in meters. While the JointData.positionImage (the joint position in 2D coordinates) is expressed in pixels. This might be the reason why you're getting such different values.

 

 

Regards,

 

Pablo M.

 

0 Kudos
idata
Employee
551 Views

Hi Pablo,

Thanks for your reply.

I am comparing the depth values in the same unit. The first one is "JointData.positionWorld.z", which is in meters, and the other one is "vertices[pos].z", which is in mm.

I only use JointData.positionImage to get the joint pixel position, in order to find which vertice (or "pos" above) contains the same data.

The link below shows the vertice's depth unit.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/queryvertices_pxcprojection.html?zoom_highlightsub=vertices QueryVertices

Best,

Eric

0 Kudos
jb455
Valued Contributor II
551 Views

Your problem may be that the result of QueryVertices is aligned to the depth image, while presumably the JointData is relative to the colour image. Check out https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?mapcolortodepth_pxcprojection.html MapColourToDepth for a quick way to convert a small number of points between the colour and depth images.

0 Kudos
idata
Employee
551 Views

Hi all,

I still cannot figure out what the problem is.

Right now I obtain the depth information directly from the depth image, using "PIXEL_FORMAT_DEPTH". The result seems satisfactory.

Best,

Eric

0 Kudos
idata
Employee
551 Views

Now I face another problem. The depth value for joint is good in accuracy, however when I tried measuring the distance from a planar plane, the depth value is not accurate at all. Do you guys have any suggestions?

0 Kudos
idata
Employee
552 Views

I reduced the data capturing range and the result is good. Problem solved.

FLeac
Novice
551 Views

Hi Eric,

is your tool open source? I would be happy to play a little with it.

0 Kudos
idata
Employee
551 Views

Sorry, I'm sure I cannot give you the code until the project is finished.

The program is also just a console application since I am not good at GUI.

0 Kudos
PV1
Beginner
551 Views

Hi Eric,

I am facing fairly similar issue. When the range is beyond 1000mm, the depth values are not consistent and most of them are invalid. Did you experience the same ?

What is the data capturing range that solved your problem?

Thanks in advance !

Best,

Prathyusha

0 Kudos
idata
Employee
551 Views

Hello pratzz,

 

 

Thank you for your interest on Intel® RealSense™ Technology.

 

 

For future references, your ticket number is 03154411. Please keep this number handy in case you are asked for it.

 

 

Beyond 1000mm you are getting close to the maximum effective range of the camera, which is 1200mm, so degradation of depth accuracy at this range is expected. If long range is important, set the IVCAMMotionRangeTradeOff to 100 using

 

 

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/setivcammotionrangetradeoff_device_pxccapture.html

 

 

I hope you find this information useful.

 

 

Best regards,

 

 

Josh B.

 

Intel Customer Support

 

0 Kudos
PV1
Beginner
551 Views

Thanks Josh. It helped.

Best,

Prathyusha

0 Kudos
Reply