Sampling(采样)- 2D
Color
Setting Settings2D::Sampling::Color to rgb or grayscale specifies the type of information that can be captured from the scene.
Depending on camera model the setting will have different options.
Zivid 2/2+ |
Zivid 2+ R |
Zivid 3 |
|
|---|---|---|---|
|
✓ |
✓ |
✓ |
|
✓ |
||
|
✓ |
✓ |
The behavior of different capture functions in relation to Settings2D::Sampling::Color is as follows:
Capture2D3D() 和 Capture2D()
Acquire full color information when
Settings2D::Sampling::Coloris set torgb.Acquire texture or intensity information when
Settings2D::Sampling::Coloris set tograyscale.
Capture3D()
Does not acquire color or texture information, regardless of the
Settings2D::Sampling::Colorsetting.为所有像素分配统一的 RGB 值( \(R=200\) 、 \(G=50\) 和 \(B=200\) ),从而产生粉红色的图像和点云。
捕获功能 |
|
2D 图像 |
点云 |
|---|---|---|---|
|
|
RGB图像 |
RGB图像 |
|
RGB图像 |
RGB图像 |
|
|
灰度图像 |
灰度图像 |
|
|
RGB图像 |
RGB图像 |
|
|
|
RGB图像 |
/ |
|
RGB图像 |
/ |
|
|
灰度图像 |
/ |
|
|
RGB图像 |
/ |
|
|
|
粉色图像 |
粉色图像 |
|
粉色图像 |
粉色图像 |
|
|
粉色图像 |
粉色图像 |
|
|
粉色图像 |
粉色图像 |
Pixel
The Settings2D::Sampling::Pixel parameter is used to choose the sampled pixels to generate 2D image.
Depending on camera model the setting will have different options.
Zivid 2/2+ |
Zivid 2+R/3 |
|
|---|---|---|
|
✓ |
✓ |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
给定相机的相应分辨率如下:
3D 捕获 |
Zivid 3 |
Zivid 2+/2+R |
Zivid 2 |
|---|---|---|---|
全分辨率 [1] |
2816 x 2816 |
2448 x 2048 |
1944 x 1200 |
2x2 [1] |
1408 x 1408 |
1224 x 1024 |
972 x 600 |
4x4 [1] |
704 x 704 |
612 x 512 |
不适用 |
当设置为 all 时,所有像素都会被采样,并且二维图像具有全分辨率。
下图展示了传感器网格和相关索引。
当我们进行子采样/下采样(2x2)时,我们得到原始像素数量的 1/4 的像素。
这意味着,在进行 2x2 子采样或下采样之后,x 和 y 轴上的像素数量将除以 2。对于 4x4 进行子采样,x 和 y 轴上的点数量将除以 4。
As an example see the zoomed-in sections of three images of the same scene, each captured with different Settings2D::Sampling::Pixel setting.
子采样缩短了采集和捕获时间,因为需要捕获和处理的数据量减少了。此外,它消除了将数据下采样以转换为更易管理大小的需求,从而减少了存储和后处理的要求。数据量减少到四分之一后,用户的后处理(例如,基于AI的分割算法)速度会更快。
Interval(间隔)
Sampling Interval(采样间隔)设置控制 2D 图像采集的时间,以避免受到外部光源的干扰。
备注
2D Sampling Interval (2D 采样间隔)功能仅适用于 Zivid 3。
When Settings2D::Sampling::Interval is disabled, the camera captures images as quickly as possible, based solely on the specified exposure times.
When Settings2D::Sampling::Interval is enabled, the base time interval for 2D image acquisition is defined by the Settings2D::Sampling::Interval::Duration parameter.
Actual acquisitions will align with the nearest multiple of this duration, depending on the exposure times.
例子
如果曝光时间为 3000 微秒,采样间隔持续时间为 10000 微秒,则采集将在 10000 微秒 (1 x 10000 微秒) 时发生。
如果曝光时间为 15000 微秒,采样间隔持续时间为 10000 微秒,则采集将在 20000 微秒 (2 x 10000 微秒) 时发生。
如果曝光时间为 9000 微秒,持续时间为 10000 微秒,由于系统开销,采集可能仍会在 20000 微秒时发生。这种行为在运行时确定,无法预先预测。
当曝光时间接近采样间隔持续时间时,由于内部处理开销,捕获时间可能会波动。
适应闪烁的环境光
采样间隔在存在闪烁的环境光的环境中尤其有用,例如:
交流电(AC)供电的荧光灯
带强光LED照明的条形码扫描器
如果曝光时间未与电网频率同步,闪烁的光源可能导致所捕获图像出现颜色不一致的问题,例如 随机出现绿色或粉色色偏 。
交流电灯闪烁
为了缓解这种情况:
Enable
Settings2D::Sampling::IntervalSet
Settings2D::Sampling::Interval::Durationbased on the grid frequency:10 000 µs for 50 Hz
8 333 µs for 60 Hz
这种同步有助于避免闪烁光线的干扰,并确保色彩还原的一致性。
备注
将 Exposure Time(曝光时间) 与电网频率匹配比使用采样间隔更好。采样间隔仅作为备选方案,例如,当无法通过调整曝光时间来避免 2D 图像过曝时。另一个例子是,当使用更长的曝光时间来补偿时,需要将投影仪亮度降低过多,从而导致彩色图像噪点增加。这种情况在使用 rgb 模式时会出现,而使用 rgbStrongAmbientLight 时则不会。
If your exposure times already compensate for flicker (e.g., 10 000 µs for 50 Hz), it is recommended to keep Settings2D::Sampling::Interval disabled.
主动光源
采样间隔还可以用于与主动脉冲光源(例如条形码扫描器、LED频闪灯)同步,从而有助于最大限度地减少干扰并提高图像质量。了解更多关于 如何避免来自自动光源的干扰 。
版本历史记录
SDK |
变更 |
|---|---|
2.17.0 |
增加了对 Zivid 3 相机 Sampling Interval (采样间隔)设置的支持。 |