捕获速度
3D应用中一个重要因素是速度。为了估计应用的运行速度,我们需要知道每个组件需要多少时间。有两个重要的测量项目可以估计 Zivid 需要多少时间:
- 捕获函数返回时间
这是执行
captureAPI 所需的时间。当 API 返回时,可以安全地阻挡相机的 FOV 或移动相机。在 Zivid Studio 中,CaptureFunctionReturnTime 显示为Acquisition Time(采集时间)。- 捕获时间
这是从调用
captureAPI 到点云在 GPU 上可用所需的时间。它不包括将数据从 GPU 内存复制到系统内存。- CopyTime
This is the time it takes to copy a specific point cloud data type from GPU memory to system memory. It is measured for each data type individually, so that you can estimate the cost of only copying what your application needs.
关于捕捉过程的详细介绍,请查看 点云捕获过程 。
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 来对您的硬件进行基准测试。
Copy Speed
After capture, the point cloud resides on the GPU. Copying data from GPU memory to system (CPU) memory takes time that must be accounted for in throughput-sensitive applications.
- PointXYZ
3D position in millimeters (X, Y, Z). 12 bytes per pixel. Use when you need 3D coordinates only.
- PointXYZW
3D position plus a homogeneous W coordinate (X, Y, Z, W). 16 bytes per pixel. W is padded to align data for efficient GPU memory access.
- ColorRGBA
Color per pixel (red, green, blue, alpha). 4 bytes per pixel.
- SNR
Signal-to-Noise Ratio per pixel. 4 bytes per pixel. Indicates depth measurement confidence: higher SNR means lower noise. See SNR值.
- Combinations (e.g. PointXYZ+ColorRGBA+SNR)
Multiple data types copied in a single SDK call. More efficient than separate calls when your application needs more than one type.