Article ID: 000030737 Content Type: Product Information & Documentation Last Reviewed: 08/18/2021

How Do I Get Real Distance of Objects Using .ply Files with Intel® RealSense™ D400 Cameras?


Intel® RealSense™ SDK (software developer's kit) 2.0 Intel® RealSense™ SR300


How to get x,y,z coordinates coordinate points of object and how to reduce noise of .ply files exported to MeshLab*


After getting .ply files from Intel® RealSense™ Viewer and transforming into .pcd files, I am trying to get (x,y,z) coordinates. The position information I got is not the real distance to the object. How do I get the real position information? When opening .ply files in Meshlab*, the files have a lot of noise that allow for incorrect information. How can I filter the noise to get only the information I want?


To get distance values, use an API to run the code here.
The exported PLY file contains points that were created using the pointcloud.calculate() function which returns points with coordinates that are expressed in meters. See this write-up for more details on Points coordinates.

For noisy .ply files, keep in mind that .ply files exported from the RealSense Viewer into MeshLab for the D400 series cameras do not perform nearly as well as the SR300 camera – images usually appear very distorted in MeshLab.

To remedy noisy point cloud data, some settings can be adjusted in the RealSense Viewer to decrease noise. Some settings that were helpful in decreasing noise when reproducing this problem in the lab are listed below:

Resolution: 1280 x 720 @ 30 FPS (frames per second)
Infrared 1 & Infrared 2: Y8
Disable Auto Exposure (User Control Menu of the Stereo Module)
Exposure: 5040.00
Gain: 16.00
Depth Units: 100 (under Advanced Control/Depth Table)
Depth Units:0.0001(under Controls)
Adjust Disparity Shift (under Advanced Control/Depth Table)
Adjust Laser Power (under Controls) depending on lightning conditions

Other settings that can be adjusted to get better depth data can be found here.

Applying post-processing filters may also help with reducing noise. However, these presets and filters can only eliminate noisy point cloud data to a certain extent. If more noise needs to be decreased to get better data, manually removing noisy points from point cloud data using a filter in the PCL might be helpful as well.


Related Products

This article applies to 1 products