Point Cloud Export Using RecFusion SDK


I am currently running the demo version of recfusion sdk version 2.2. I’m trying to export a 3D point cloud using two rgb-d cameras (intel realsense l515 and microsoft azure kinect).

For context, I am using a multi rgb-d camera set up (maybe 3 or 4 cameras) to first segment an object, and extract its point cloud in real time.

My question is, am I able to export the aligned 3D point cloud from the rgb-d cameras into a specific file location on my pc? I see the option to export .ply/.obj using once the reconstruction is finished. However, I’m interested in extracting the raw point cloud data during the reconstruction itself. In the following thread (Point Cloud Data Export), it appears you can export the point clouds from the individual frames during the reconstruction on recfusion pro. I’m wondering if this can be done using the licensed version of the recfusion sdk.

Thank you in advance! :slight_smile:

In the SDK there is no point cloud export function. You can use a third-party library such as PCL or Open3D to save point clouds given the pose returned in trackedT in Reconstruction::addFrame.

Thank you for your response! That makes sense.

Do you happen to have a sample program returning the pose of the camera? Per the documentation the Reconstruction::addFrame only returns a true/false value, not the camera pose.

The pose is returned in the output parameter trackedT in

bool addFrame(int sensor, const DepthImage& imgDepth, const ColorImage& imgColor, bool* trackingStatus = 0, ColorImage* imgScene = 0, Mat4* T = 0, Mat4* sensorT = 0, Mat4* trackedT = 0, bool dontForceFirstFrame = false);

You must pass a pointer to a Mat4 to this parameter and when the function returns successfully it will contain the camera pose.