基于捕获速度的设置选择器

本章节将根据您从触发采集到获得点云的时间预算来提供有关最佳相机设置的详细说明。同时,我们还会考虑您的PC规格,因为数据传输和点云处理也取决于此。我们通过优化3D捕获的设置来获得良好的点云,以及通过优化2D捕获的设置来获得良好的彩色图像。

在这之前,您已确定选择哪款Zivid相机用于您的单品拣选应用,并且已正确安装和定位它。下一步是根据您的PC规格选择满足您的周期时间要求的相机设置。如果您还没有准备好PC,本文也介绍了如何结合使用的设置找到满足您的捕获时间要求的PC规格。

3D设置

我们根据场景的复杂性将单品拣选应用分为两类。对于每个类别,我们指定并推荐满足给定成像要求和捕获速度要求的设置。

消费品(Consumer Goods)

如果您的场景不包含非常明亮、反光和深色的物体,您可以选择适用于单品拣选的快速设置(Fast settings)来节省大量的循环时间。快速设置(Fast settings)覆盖了较窄的动态范围,但能够提供更快的捕获。这里有一个适合使用快速设置的场景示例。如您所见,里面没有导致强烈直接反射、高光和饱和度的物体,也没有颜色非常暗的物体。

消费品场景——快速设置/Fast settings

备注

如果场景中没有明亮、反光和深色的物体,请选择快速设置。

通过消费品的质量设置(Quality settings),相机覆盖了相当宽的动态范围,对各种物体都能提供良好的点云。在这种情况下,场景可以包含从明亮和反光的塑料包装物体和装载塑料袋中的物品到深色吸收材料中的任何物体。下图描绘了一个典型的需要质量设置的复杂消费品场景。

备注

如果您希望确保相机不会丢失任何物体的数据,请选择质量设置(Quality settings)。

设置选择表

下表是一个基于所需捕获时间预算的设置选择器工具。这张表格同时显示了可以满足您的捕获速度要求的 PC 的性能和成本。你可以转到 推荐的工业 PC 来查看高端、中端和低端PC配置的示例。

If you notice color Inconsistency in form of random color tint in your color images, choose the presets for the grid frequency in your region (50 Hz or 60 Hz). If the ambient light is unproblematic, select Off for optimal performance. To be sure, you can can check if there is flickering light in the scene with the Zivid camera.

应用

捕获时间(2D + 3D)

相机设置

高端电脑

中端电脑

低端电脑

消费品(质量/Quality)

~250 毫秒

~850 毫秒

~1600 毫秒

Z2+ MR130 Quality

Z2+ MR60 Quality

Z2+ LR110 Quality

消费品(快速/Fast)

~150 毫秒

~250 毫秒

~430 毫秒

Z2+ MR130 Fast

Z2+ MR60 Fast

Z2+ LR110 Fast

如需下载所需的设置文件,您还可以在 Zivid Studio 中连接到相机(您的特定型号),选择预设设置,打开环境光适应,然后导出设置。

小心

适应环境光频率的设置的捕获时间可能会更长。

应用

相机设置

消费品(质量/Quality)

Z2+ MR130 Quality

Z2+ MR60 Quality

Z2+ LR110 Quality

消费品(快速/Fast)

Z2+ MR130 Fast

Z2+ MR60 Fast

Z2+ LR110 Fast

如需下载所需的设置文件,您还可以在 Zivid Studio 中连接到相机(您的特定型号),选择预设设置,打开环境光适应,然后导出设置。

小心

适应环境光频率的设置的捕获时间可能会更长。

应用

相机设置

消费品(质量/Quality)

Z2+ MR130 Quality

Z2+ MR60 Quality

Z2+ LR110 Quality

消费品(快速/Fast)

Z2+ MR130 Fast

Z2+ MR60 Fast

Z2+ LR110 Fast

为了证实能够达到上述单品拣选应用的要求,我们在多种不同规格的PC上使用Zivid相机运行基准捕获程序(benchmark capture programs)。下表显示了其结果。

hidden
hidden
2+R
Low-end IntelHigh-end NVIDIAHigh-end IntelLow-end Jetson NVIDIAHigh-end Jetson NVIDIA
2D3D2D3D2D3D2D3D2D3D
Consumer Goods Settings
Consumer Goods Fast
Consumer Goods Quality

包裹分拣

根据场景复杂性和捕获时间,包裹分拣设置也分为两种设置。

Parcels(包裹) 快速设置旨在实现最短的循环时间。这些设置的动态范围有限,但对于相对容易成像的物体来说已经足够了,例如:

  • 纸板箱

  • 白色信封

  • 亮光塑料袋

备注

如果您仅对箱子、包裹等进行成像,请选择包裹快速设置设置(Parcels Fast)。

小技巧

尝试增加曝光时间以获得对深色的镜面物体的更多数据覆盖或切换到包裹质量预设。

对于更具挑战性的场景,您应该尝试 Parcels(包裹) 质量设置。这些设置具有更大的动态范围,并且能够在以下对象上获得良好的表面覆盖:

  • 黑色塑料袋

  • 深色塑料袋

  • 深色气泡膜

小技巧

如需减少捕获时间,可以将引擎从 Omni 切换为 Stripe, 但是请注意,这样可能对黑色包裹的成像产生影响。

设置选择表

If you experience color Inconsistency in form of random color tint in your color images or artifacts in the form of ripples/waves across the whole point cloud, choose 50/60 Hz to select presets adapted to the ambient light (grid) frequency. If the ambient light is unproblematic, select Off for optimal performance. To be sure, you can can check if there is flickering light in the scene with the Zivid camera.

应用

捕获时间(2D + 3D)

相机设置

高端电脑

中端电脑

低端电脑

包裹(质量)

~135 毫秒

~900 毫秒

~1600 毫秒

Z2+ MR130 Quality

Z2+ LR110 Quality

Z2 M70 Reflective

Z2 L100 Reflective

包裹(快速/Fast)

~50 毫秒

~100 毫秒

~ 200毫秒

Z2+ MR130 Fast

Z2+ LR110 Fast

Z2 M70 Matte

Z2 L100 Matte

如需下载所需的设置文件,您还可以在 Zivid Studio 中连接到相机(您的特定型号),选择预设设置,打开环境光适应,然后导出设置。

小心

适应环境光频率的设置的捕获时间可能会更长。

如需下载所需的设置文件,您还可以在 Zivid Studio 中连接到相机(您的特定型号),选择预设设置,打开环境光适应,然后导出设置。

小心

适应环境光频率的设置的捕获时间可能会更长。

为了证明包裹预设设置能够达到上述要求,我们在各种 PC 上使用我们的相机不断运行基准捕获程序。下表显示了其结果。

hidden
hidden
2+R
Low-end IntelHigh-end NVIDIAHigh-end IntelLow-end Jetson NVIDIAHigh-end Jetson NVIDIA
2D3D2D3D2D3D2D3D2D3D
Parcels Settings
Parcels Fast
Parcels Quality

测试3D设置

您可以使用 Zivid Studio 来测试 3D 设置。

可通过以下操作在Zivid Studio中导入设置:

  • 点击 FileImport Capture Settings

  • 导航到设置文件的位置

  • 点击Open

您还可以将 YML 文件拖放到 Zivid Studio 中以导入设置。

您也可以使用 SDK 加载设置。

跳转到源码

源码

const auto settings = Zivid::Settings(settingsPath);
跳转到源码

源码

var settings = new Zivid.NET.Settings(settingsFile);
跳转到源码

源码

settings = zivid.Settings.load(settings_file)

2D设置

我们为您的单品拣选应用提供三种获取 2D 设置的选项:

  • 使用设置预设

  • 使用Zivid标定板和代码示例来自动获取2D设置

  • 手动调整 2D 设置

3D 设置预设也包括 2D 设置。因此,我们建议对 3D 和 2D 捕获使用相同的设置预设。如果这不能提供令人满意的结果,请查看以下选项。

自动 2D 设置

运行 auto_2d_settings.py 示例,使用 Zivid 标定板自动查找 2D 捕获的采集设置。将标定板放置在箱子的顶部或底部,并通过指定标定板位置和所需的对焦范围(箱子高度)作为命令行参数来运行示例。例如,如果您将标定板放置在箱子顶部,箱子高度为 400 毫米,则按如下方式运行示例:

python auto_2d_settings.py --desired-focus-range 400 --checkerboard-at-start-of-range --use-projector --no-color-balance

如果将标定板放在料箱底部,请运行:

python auto_2d_settings.py --desired-focus-range 400 --checkerboard-at-end-of-range --use-projector --no-color-balance

手动调整 2D 设置

如果 2D 设置预设或自动调整无法提供足够的 2D 质量,您可以通过调整色彩平衡和伽马参数来手动调整颜色设置。伽马校正可用于使图像变暗或变亮。颜色通道参数使彩色图像看起来更自然。

有关如何优化颜色的深入教程,请参阅 优化彩色图像

测试2D设置

要测试 2D 设置,您可以使用 Zivid Studio 中的 2D 捕获模式或运行我们的一个代码示例。

可通过以下操作在Zivid Studio中导入设置:

  • 点击 FileImport Capture Settings

  • 导航到设置文件的位置

  • 点击Open

您还可以将 YML 文件拖放到 Zivid Studio 中以导入设置。

以下代码展示了如何在 API 中使用导出的设置。

跳转到源码

源码

auto camera = zivid.connectCamera();
const auto settings = Zivid::Settings(settingsPath);
    const auto frame2D = camera.capture2D(settings);
跳转到源码

源码

var camera = zivid.ConnectCamera();
var settings = new Zivid.NET.Settings(settingsFile);
using (var frame2D = camera.Capture2D(settings))
跳转到源码

源码

camera = app.connect_camera()
settings = zivid.Settings.load(settings_file)
frame_2d = camera.capture_2d(settings)

完成捕获后,可以选择保存为 线性 RGB(linear RGB) 或 sRGB 格式的图像。

跳转到源码

源码

const auto imageRGBA = frame2D.imageRGBA();
const auto imageFile = "ImageRGBA_linear.png";
std::cout << "Saving 2D color image (Linear RGB) to file: " << imageFile << std::endl;
imageRGBA.save(imageFile);
跳转到源码

源码

var imageRGBA = frame2D.ImageRGBA();
var imageFile = "ImageRGBA_linear.png";
Console.WriteLine($"Saving 2D color image (Linear RGB) to file: {imageFile}");
imageRGBA.Save(imageFile);
跳转到源码

源码

image_rgba = frame_2d.image_rgba()
image_file = "ImageRGBA_linear.png"
print(f"Saving 2D color image (sRGB color space) to file: {image_file}")
image_rgba.save(image_file)

跳转到源码

源码

const auto imageSRGB = frame2D.imageRGBA_SRGB();
const auto imageFile = "ImageRGBA_sRGB.png";
std::cout << "Saving 2D color image (sRGB color space) to file: " << imageFile << std::endl;
imageSRGB.save(imageFile);
跳转到源码

源码

var imageSRGB = frame2D.ImageRGBA_SRGB();
var imageFile = "ImageRGBA_sRGB.png";
Console.WriteLine($"Saving 2D color image (sRGB color space) to file: {imageFile}");
imageSRGB.Save(imageFile);
跳转到源码

源码

image_srgb = frame_2d.image_rgba_srgb()
image_file = "ImageRGBA_sRGB.png"
print(f"Saving 2D color image (sRGB color space) to file: {image_file}")
image_srgb.save(image_file)

备注

我们在低环境光(~300 lx)和高环境光(~1000 lx)条件下测试了我们为上述典型场景推荐的3D和2D设置。我们已经完成了我们在相机选择器章节中指定的距离范围,以及场景中的所有项目的测试。因此,我们相信这些设置将适用于属于这些类别的大多数场景。但是,如果您确切地知道场景中的项目是什么,并且您是专业的相机使用者,则可以手动配置设置以针对您的情况来优化它们。您可以查看 捕获高质量的点云 来了解如何做到这一点。

Avoiding interference from flickering light

Flickering light sources (10-1000 Hz), such as barcode readers and old fluorescent tubes, can interfere with the Zivid camera. To prevent this, ensure the flickering light source is either:

  1. continuous and frequency correlated to the Zivid camera exposure time, or

  2. inactive during the Zivid camera acquisition.

Configuration when flickering light is active

Match the active light source, e.g., barcode scanner, frequency (fc) to the Zivid camera exposure time (tz) using:

fc=1tz

For example:

tz=10000μsfc=100Hz

If you are unsure about the frequency of the flickering light source, you can measure it with the Zivid camera. If measuring for one source, e.g., barcode scanner, turn off all other light sources in the scene, e.g., ambient lights.

跳转到源码

source

std::cout << "Measuring scene conditions" << std::endl;
auto sceneConditions = camera.measureSceneConditions();
auto flickerClassification = sceneConditions.ambientLight().flickerClassification().toString();
std::cout << flickerClassification << std::endl;
auto flickerFrequency = sceneConditions.ambientLight().flickerFrequency();
std::cout << "Measured flickering frequency in the scene: " << flickerFrequency << " Hz." << std::endl;
跳转到源码

source

Console.WriteLine("Measuring scene conditions");
var sceneConditions = camera.MeasureSceneConditions();
var FlickerClassification = sceneConditions.AmbientLight.FlickerClassification.ToString();
var flickerFrequency = sceneConditions.AmbientLight.FlickerFrequency;
Console.WriteLine($"Measured flickering frequency in the scene: {flickerFrequency} Hz.");
跳转到源码

source

print("Measuring scene conditions")
scene_conditions = camera.measure_scene_conditions()
flicker_classification = scene_conditions.ambient_light.flicker_classification
flicker_frequency = scene_conditions.ambient_light.flicker_frequency
print(f"The measured flickering frequency in the scene: {flicker_frequency} Hz.")

The presence of strong and uncontrollable light sources operating with power line frequency modulation (e.g., 60 Hz in the US, 50 Hz in the EU) can introduce additional challenges. To mitigate the interference from ambient light, fix the exposure times of the Zivid camera to match a multiple of the power line period. For example, 8333 µs or 16667 µs in the US, or 10000 µs or 20000 µs in the EU.

The exposure times must be configured for 2D acquisitions to avoid 颜色不一致(随机色调). For 3D acquisitions, this is not necessary unless the 环境光干扰产生的波纹 are observed.

Finally, the frequency of the active flickering light source, matched to the Zivid camera exposure time, can be calculated as:

fc=n×fline
fline=60Hzfc=n×60Hz=60,120,180,240Hz
fline=50Hzfc=n×50Hz=50,100,150,200Hz

在下一章节中,我们将介绍如何通过使用多线程来 优化机器人循环时间

版本历史

SDK

变更

2.16.0

Added support for measuring ambient light frequency and guidelines to avoid ambient light interference.

2.12.0

Zivid One+ 已达到其生命周期的终点并且不再受支持。