捕获速度
To estimate how fast your application can operate, measure three timings: CaptureFunctionReturnTime, CaptureTime, and CopyTime. Together they show how much time Zivid requires for each stage of a capture, so you can identify where to optimize.
- 捕获函数返回时间
This is the time it takes to execute the capture API. When the API returns it is safe to block the FOV of the camera or move the camera. In Zivid Studio, CaptureFunctionReturnTime is shown as Acquisition Time.
- 捕获时间
This is the time it takes from calling the capture API until the point cloud is available on the GPU. It does not include copying data from GPU memory to system memory.
- 复制时间
这是将特定点云数据类型从 GPU 内存复制到系统内存所需的时间。此项针对每种数据类型单独测量,以便您可以估算仅复制应用所需数据的成本。
关于捕捉过程的详细介绍,请查看 点云捕获过程 。
Zivid 对不同硬件上的所有预设设置进行了基准测试,无论是 高端或者低端 硬件配置。这些基准会随着时间的推移而变化,在大多数情况下会随着我们转向更新的 SDK 版本而有所改善。对于相关数值,请选择与您的 SDK 版本相对应的本文档版本。
您可以在 Zivid Studio 中以及通过 SDK 查看您的采集和捕获时间。
const auto frame = camera.capture2D3D(settings);
const auto frameInfo = frame.info();
std::cout << "Acquisition time:" << std::endl;
std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(
frameInfo.metrics().acquisitionTime().value())
.count()
<< " ms" << std::endl;
std::cout << "Capture time:" << std::endl;
std::cout
<< std::chrono::duration_cast<std::chrono::milliseconds>(frameInfo.metrics().captureTime().value()).count()
<< " ms" << std::endl;
using (var frame = camera.Capture2D3D(settings))
{
var frameInfo = frame.Info;
Console.WriteLine("Acquisition time:");
Console.WriteLine(frameInfo.Metrics.AcquisitionTime.Milliseconds + " ms");
Console.WriteLine("Capture time:");
Console.WriteLine(frameInfo.Metrics.CaptureTime.Milliseconds + " ms");
您还可以运行我们的 C++ 示例 ZividBenchmark.cpp 对您的硬件进行基准测试。要测量您自己的系统,请将结果整理成报告并与我们分享,请参阅 对您的系统进行基准测试。
复制速度
捕获后,点云驻留在 GPU 上。将数据从 GPU 内存复制到系统(CPU)内存需要一定时间,在对吞吐量敏感的应用中必须考虑这一点。
- PointXYZ
以毫米表示的 3D 位置(X、Y、Z)。每像素 12 字节。仅需要 3D 坐标时使用。
- PointXYZW
3D 位置加上齐次 W 坐标(X、Y、Z、W)。每像素 16 字节。W 用于填充数据以实现高效的 GPU 内存访问对齐。
- ColorRGBA
每像素的颜色(红、绿、蓝、alpha)。每像素 4 字节。
- SNR
每像素的信噪比。每像素 4 字节。表示深度测量的置信度:SNR 越高表示噪声越低。请参阅 SNR 值。
- 组合(例如 PointXYZ+ColorRGBA+SNR)
在单次 SDK 调用中复制多种数据类型。当您的应用需要多种数据类型时,比多次单独调用更高效。