Point Cloud Capture Process

Note

The point cloud capture process has significantly changed with Zivid SDK 2.9. To see the process for an earlier SDK version, change the Knowledge Base version in the top left corner.

The capture API returns when the acquisition is done. This is the moment in time when the camera completes capturing raw images.

Go to source

source

const auto frame = camera.capture(settings);
Go to source

source

using (var frame = camera.Capture(settings))
Go to source

source

with camera.capture(settings) as frame:

The API to get the point cloud returns at some moment in time before or at the moment the point cloud processing is done. This depends on the GPU (vendor and driver). Therefore, after the point cloud API returns, the point cloud processing might still be running in the background. The point cloud object holds a handle to the point cloud data in GPU memory.

Note

The API to get the point cloud does not trigger point cloud processing; that happens automatically with the capture API.

Tip

Use recommended hardware to minimize computation time.

Go to source

source

const auto pointCloud = frame.pointCloud();
Go to source

source

var pointCloud = frame.PointCloud;
Go to source

source

point_cloud = frame.point_cloud()

Tip

For optimized timing, move the robot or move the objects in the scene after the capture API returns. This has to happen before or at the same time when calling the API to get the point cloud.

We need to call the API to copy the point cloud from the GPU memory to the CPU memory. The copy function will block and wait until the data is available before copying it. When the function returns, the data is available and ready for use in CPU memory.

Note

Even if using a CPU with an integrated GPU, the data is copied to a different area on the same main RAM.

Go to source

source

const auto data = pointCloud.copyData<Zivid::PointXYZColorRGBA>();
Go to source

source

var pointCloudData = pointCloud.CopyPointsXYZColorsRGBA();
Go to source

source

xyz = point_cloud.copy_data("xyz")
rgba = point_cloud.copy_data("rgba")

When the point cloud is available on the CPU memory, we can utilize it in our machine vision application.

Performance Considerations

Read our Performance Considerations to learn how to utilize Zivid SDK to optimize your application for speed with regards to the point cloud capture process. Here we cover:

Version History

SDK

Changes

2.12.0

Capture time with colors enabled is reduced up to 10-20% with low-end GPUs. 3D acquisition time on Zivid 2+ is reduced by about 5%.

2.11.0

Zivid 2 and 2+ now support concurrent processing and acquisition for 3D ➞ 2D and 3D ➞ 2D, and switching between capture modes have been optimized.

2.10.0

Capture speed improved when Hole Filling filter is used and when color is disabled.

2.9.0

Capture function returns when the acquisition is done and improved capture speed.

2.8.0

Improved capture speed of Zivid 2.