跳转到内容

Image ROI#

相机的 Image ROI 功能允许您指定要使用传感器阵列的哪些部分采集图像。

ROI 是 Region of Interest(即兴趣区的英文首字母缩写,以前为 AOI = 兴趣区)。

如果指定了图像 ROI,则相机将仅传输该区域内的像素数据。在大多数相机上,这会大大提高相机的最大帧速率。

图像 ROI 设置独立于自动功能 ROI 设置。

该功能的使用#

更改 Image ROI 的位置和大小#

启用出厂设置后,相机将设置为默认分辨率。但是,您可以根据需要更改位置和大小。

要更改图像 ROI 的位置和大小,请执行以下操作:

  1. 确保相机空闲,即未在捕获图像。
  2. CenterXCenterY 参数设置为 false
  3. 使用以下参数指定图像 ROI 的大小

    • Width
    • Height
    • 使用以下参数指定图像 ROI 的位置

    • OffsetX

    • OffsetY

图像 ROI 的原点位于传感器阵列的左上角(第 0 列、第 0 行)。

示例:假设您指定了以下设置:

  • Width = 16
  • Height = 10
  • OffsetX = 2
  • OffsetY = 6

这将创建以下图像 ROI:

Image ROI 示例

信息

  • 大多数相机上,减小图像 ROI 的大小(尤其是高度)会显著提高相机的最大帧速率。
  • 如果启用了 Binning 功能,图像 ROI 设置是指经过像素合并的行和列,而不是传感器中的物理线路。

指导准则#

指定图像 ROI 时,请遵循以下准则:

指导准则 示例
OffsetX + WidthWidthMax 具有 1920 x 1080 像素的传感器:
OffsetX + Width ≤ 1920
OffsetY + HeightHeightMax 具有 1920 x 1080 像素的传感器:
OffsetY + Height ≤ 1080

WidthMaxHeightMax 参数值适用于当前的 BinningDecimationScaling 设置(如果可用)。

详情#

Image ROI 大小#

显示所有相机型号

相机型号 最小宽度 宽度增量 最小高度 高度增量
a2A1920-51gcBAS 4 4 2 2
a2A1920-51gcPRO 4 4 2 2
a2A1920-51gmBAS 4 4 1 1
a2A1920-51gmPRO 4 4 1 1
a2A1920-160ucBAS 4 4 2 2
a2A1920-160ucPRO 4 4 2 2
a2A1920-160umBAS 4 4 1 1
a2A1920-160umPRO 4 4 1 1
a2A2590-22gcBAS 4 4 2 2
a2A2590-22gcPRO 4 4 2 2
a2A2590-22gmBAS 4 4 1 1
a2A2590-22gmPRO 4 4 1 1
a2A2590-60ucBAS 4 4 2 2
a2A2590-60ucPRO 4 4 2 2
a2A2590-60umBAS 4 4 1 1
a2A2590-60umPRO 4 4 1 1
a2A3840-13gcBAS 4 4 2 2
a2A3840-13gcPRO 4 4 2 2
a2A3840-13gmBAS 4 4 1 1
a2A3840-13gmPRO 4 4 1 1
a2A3840-45ucBAS 4 4 2 2
a2A3840-45ucPRO 4 4 2 2
a2A3840-45umBAS 4 4 1 1
a2A3840-45umPRO 4 4 1 1
acA640-90gc 2 2 2 2
acA640-90gm 1 1 1 1
acA640-90uc 2 2 2 2
acA640-90um 1 1 1 1
acA640-120gc 2 2 2 2
acA640-120gm 1 1 1 1
acA640-120uc 2 2 2 2
acA640-120um 1 1 1 1
acA640-121gm 1 1 1 1
acA640-300gc 16 16 2 2
acA640-300gm 16 16 1 1
acA640-750uc 16 16 2 2
acA640-750um 16 16 1 1
acA720-290gc 2 2 2 2
acA720-290gm 1 1 1 1
acA720-520uc 2 4 2 2
acA720-520um 1 4 1 1
acA780-75gc 2 2 2 2
acA780-75gm 1 1 1 1
acA800-200gc 16 16 2 2
acA800-200gm 16 16 1 1
acA800-510uc 16 16 2 2
acA800-510um 16 16 1 1
acA1280-60gc 2 2 2 2
acA1280-60gm 1 1 1 1
acA1300-22gc 2 2 2 2
acA1300-22gm 1 1 1 1
acA1300-30gc 2 2 2 2
acA1300-30gm 1 1 1 1
acA1300-30uc 2 2 2 2
acA1300-30um 1 1 1 1
acA1300-60gc 2 2 2 2
acA1300-60gm 1 1 1 1
acA1300-60gmNIR 1 1 1 1
acA1300-75gc 16 16 2 2
acA1300-75gm 16 16 1 1
acA1300-200uc 16 16 2 2
acA1300-200um 16 16 1 1
acA1440-73gc 2 2 2 2
acA1440-73gm 1 1 1 1
acA1440-220uc 2 4 2 2
acA1440-220um 1 4 1 1
acA1600-20gc 2 2 2 2
acA1600-20gm 1 1 1 1
acA1600-20uc 2 2 2 2
acA1600-20um 1 1 1 1
acA1600-60gc 2 2 2 2
acA1600-60gm 1 1 1 1
acA1920-25gc 64 2 64 2
acA1920-25gm 64 1 64 1
acA1920-25uc 64a 2 64a 2
acA1920-25um 64a 1 64a 1
acA1920-40gc 2 2 2 2
acA1920-40gm 1 1 1 1
acA1920-40uc 4 4 2 2
acA1920-40ucMED 4 4 2 2
acA1920-40um 4 4 1 1
acA1920-40umMED 4 4 1 1
acA1920-48gc 32 32 2 2
acA1920-48gm 32 32 1 1
acA1920-50gc 2 2 2 2
acA1920-50gm 1 1 1 1
acA1920-150uc 32 32 2 2
acA1920-150um 32 32 1 1
acA1920-155uc 4 4 2 2
acA1920-155ucMED 4 2 2 2
acA1920-155um 4 4 1 1
acA1920-155umMED 4 4 1 1
acA2000-50gc 2 2 2 2
acA2000-50gm 1 1 1 1
acA2000-50gmNIR 1 1 1 1
acA2000-165uc 8 8 2 2
acA2000-165um 8 8 1 1
acA2000-165umNIR 8 8 1 1
acA2040-25gc 2 2 2 2
acA2040-25gm 1 1 1 1
acA2040-25gmNIR 1 1 1 1
acA2040-35gc 2 2 2 2
acA2040-35gm 1 1 1 1
acA2040-55uc 4 4 2 2
acA2040-55um 4 4 1 1
acA2040-90uc 8 8 2 2
acA2040-90um 8 8 1 1
acA2040-90umNIR 8 8 1 1
acA2040-120uc 4 4 2 2
acA2040-120um 4 4 1 1
acA2440-20gc 2 2 2 2
acA2440-20gm 1 1 1 1
acA2440-35uc 4 4 2 2
acA2440-35ucMED 4 4 2 2
acA2440-35um 4 4 1 1
acA2440-35umMED 4 4 1 1
acA2440-75uc 4 4 2 2
acA2440-75ucMED 4 4 2 2
acA2440-75um 4 4 1 1
acA2440-75umMED 4 4 1 1
acA2500-14gc 64 2 64 2
acA2500-14gm 64 1 64 1
acA2500-14uc 64a 2 64a 2
acA2500-14um 64a 1 64a 1
acA2500-20gc 32 32 2 2
acA2500-20gcMED 32 32 2 2
acA2500-20gm 32 32 1 1
acA2500-20gmMED 32 32 1 1
acA2500-60uc 32 32 1 1
acA2500-60um 32 32 1 1
acA3088-16gc 376 4 320 2
acA3088-16gm 376 4 320 2
acA3088-57uc 376 4 320 2
acA3088-57um 376 4 320 2
acA3800-10gc 2 2 2 2
acA3800-10gm 1 1 1 1
acA3800-14uc 64 2 64 2
acA3800-14um 64a 1 64a 1
acA4024-8gc 8 4 6 2
acA4024-8gm 8 4 5 1
acA4024-29uc 8 4 6 2
acA4024-29um 8 4 5 1
acA4096-11gc 16 2 2 2
acA4096-11gm 16 1 1 1
acA4096-30uc 4 4 2 2
acA4096-30ucMED 4 4 2 2
acA4096-30um 4 4 1 1
acA4096-30umMED 4 4 1 1
acA4096-40uc 4 4 2 2
acA4096-40ucMED 4 4 2 2
acA4096-40um 4 4 1 1
acA4096-40umMED 4 4 1 1
acA4112-8gc 16 2 2 2
acA4112-8gm 16 1 1 1
acA4112-20uc 4 4 2 2
acA4112-20ucMED 4 4 2 2
acA4112-20um 4 4 1 1
acA4112-20umMED 4 4 1 1
acA4112-30uc 4 4 2 2
acA4112-30ucMED 4 4 2 2
acA4112-30um 4 4 1 1
acA4112-30umMED 4 4 1 1
acA4600-7gc 2 2 2 2
acA4600-10uc 64 2 64 2
acA5472-5gc 8 4 6 2
acA5472-5gm 8 4 5 1
acA5472-17uc 8 4 6 2
acA5472-17ucMED 8 4 6 2
acA5472-17um 8 4 5 1
boA4096-93cc 48 16 2 2
boA4096-93cm 48 16 2 2
boA4112-68cc 48 16 2 2
boA4112-68cm 48 16 2 2
daA1280-54lc 16 2 8 2
daA1280-54lm 16 2 8 2
daA1280-54uc 16 2 8 2
daA1280-54um 16 2 8 2
daA1600-60lc 16 2 8 2
daA1600-60lm 16 2 8 2
daA1600-60uc 16 2 8 2
daA1600-60um 16 2 8 2
daA1920-15um 16 2 8 2
daA1920-30uc 16 2 8 2
daA1920-30um 16 2 8 2
daA2500-14lc 4 2 4 2
daA2500-14lm 4 2 4 2
daA2500-14uc 16 2 8 2
daA2500-14um 16 2 8 2
daA2500-60mc 不支持 Image ROI 功能 - - -
daA2500-60mci 96 8 64 8
daA4200-30mci 96 8 64 8
puA1280-54uc 16 2 8 2
puA1280-54um 16 2 8 2
puA1600-60uc 16 2 8 2
puA1600-60um 16 2 8 2
puA1920-30uc 4 2 4 2
puA1920-30um 4 2 4 2
puA2500-14uc 4 2 4 2
puA2500-14um 4 2 4 2

  1. 启用像素合并后,最小宽度和最小高度将减小。值四舍五入到最接近的整数。示例:如果您将水平像素合并配置为 3,则有效最小宽度为 64/3 = 21.333 ≈ 22。

Image ROI 偏移#

显示所有相机型号

相机型号 最小偏移量 X 偏移量 X 增量 最小偏移量 Y 偏移量 Y 增量
a2A1920-51gcBAS 0 4 0 2
a2A1920-51gcPRO 0 4 0 2
a2A1920-51gmBAS 0 4 0 1
a2A1920-51gmPRO 0 4 0 1
a2A1920-160ucBAS 0 4 0 2
a2A1920-160ucPRO 0 4 0 2
a2A1920-160umBAS 0 4 0 1
a2A1920-160umPRO 0 4 0 1
a2A2590-22gcBAS 0 4 0 2
a2A2590-22gcPRO 0 4 0 2
a2A2590-22gmBAS 0 4 0 1
a2A2590-22gmPRO 0 4 0 1
a2A2590-60ucBAS 0 4 0 2
a2A2590-60ucPRO 0 4 0 2
a2A2590-60umBAS 0 4 0 1
a2A2590-60umPRO 0 4 0 1
a2A3840-13gcBAS 0 4 0 2
a2A3840-13gcPRO 0 4 0 2
a2A3840-13gmBAS 0 4 0 1
a2A3840-13gmPRO 0 4 0 1
a2A3840-45ucBAS 0 4 0 2
a2A3840-45ucPRO 0 4 0 2
a2A3840-45umBAS 0 4 0 1
a2A3840-45umPRO 0 4 0 1
acA640-90gc 0 2 0 2
acA640-90gm 0 1 0 1
acA640-90uc 0 2 0 2
acA640-90um 0 1 0 1
acA640-120gc 0 2 0 2
acA640-120gm 0 1 0 1
acA640-120uc 0 2 0 2
acA640-120um 0 1 1 0
acA640-121gm 0 1 0 1
acA640-300gc 0 16 0 2
acA640-300gm 0 16 0 1
acA640-750uc 0 16 0 2
acA640-750um 0 16 0 1
acA720-290gc 0 2 0 2
acA720-290gm 0 2 0 2
acA720-520uc 0 2 0 2
acA720-520um 0 4 0 2
acA780-75gc 0 2 0 2
acA780-75gm 0 1 0 1
acA800-200gc 0 16 0 2
acA800-200gm 0 16 0 1
acA800-510uc 0 16 0 2
acA800-510um 0 16 0 1
acA1280-60gc 0 2 0 2
acA1280-60gm 0 1 0 1
acA1300-22gc 0 2 0 2
acA1300-22gm 0 1 0 1
acA1300-30gc 0 2 0 2
acA1300-30gm 0 1 0 1
acA1300-30uc 0 2 0 2
acA1300-30um 0 1 0 1
acA1300-60gc 0 2 0 2
acA1300-60gm 0 1 0 1
acA1300-60gmNIR 0 1 0 1
acA1300-75gc 0 16 0 2
acA1300-75gm 0 16 0 1
acA1300-200uc 0 16 0 2
acA1300-200um 0 16 0 1
acA1440-73gc 0 2 0 2
acA1440-73gm 0 2 0 2
acA1440-220uc 0 2 0 2
acA1440-220um 0 4 0 2
acA1600-20gc 0 2 0 2
acA1600-20gm 0 1 0 1
acA1600-20uc 0 2 0 2
acA1600-20um 0 1 0 1
acA1600-60gc 0 2 0 2
acA1600-60gm 0 1 0 1
acA1920-25gc 0 2 0 2
acA1920-25gm 0 1 0 2
acA1920-25uc 0 2 0 2
acA1920-25um 0 1 0 2
acA1920-40gc 0 2 0 2
acA1920-40gm 0 2 0 2
acA1920-40uc 0 4 0 2
acA1920-40ucMED 0 4 0 2
acA1920-40um 0 4 0 2
acA1920-40umMED 0 4 0 2
acA1920-48gc 0 1 0 1
acA1920-48gm 0 1 0 1
acA1920-50gc 0 2 0 2
acA1920-50gm 0 2 0 2
acA1920-150uc 0 32 0 2
acA1920-150um 0 32 0 1
acA1920-155uc 0 4 0 2
acA1920-155ucMED 0 4 0 2
acA1920-155um 0 4 0 1
acA1920-155umMED 0 4 0 1
acA2000-50gc 0 2 0 2
acA2000-50gm 0 1 0 1
acA2000-50gmNIR 0 1 0 1
acA2000-165uc 0 2 0 2
acA2000-165um 0 1 0 1
acA2000-165umNIR 0 1 0 1
acA2040-25gc 0 2 0 2
acA2040-25gm 0 1 0 1
acA2040-25gmNIR 0 1 0 1
acA2040-35gc 0 2 0 2
acA2040-35gm 0 2 0 2
acA2040-55uc 0 4 0 2
acA2040-55um 0 4 0 2
acA2040-90uc 0 2 0 2
acA2040-90um 0 1 0 1
acA2040-90umNIR 0 1 0 1
acA2040-120uc 0 4 0 2
acA2040-120um 0 4 0 2
acA2440-20gc 0 2 0 2
acA2440-20gm 0 2 0 2
acA2440-35uc 0 4 0 2
acA2440-35ucMED 0 4 0 2
acA2440-35um 0 4 0 2
acA2440-35umMED 0 4 0 2
acA2440-75uc 0 4 0 2
acA2440-75ucMED 0 4 0 2
acA2440-75um 0 4 0 2
acA2440-75umMED 0 4 0 2
acA2500-14gc 0 2 0 2
acA2500-14gm 0 1 0 2
acA2500-14uc 0 2 0 2
acA2500-14um 0 1 0 2
acA2500-20gc 0 2 0 2
acA2500-20gcMED 0 2 0 2
acA2500-20gm 0 1 0 1
acA2500-20gmMED 0 1 0 1
acA2500-60uc 0 32 0 2
acA2500-60um 0 32 0 1
acA3088-16gc 0 2 0 2
acA3088-16gm 0 2 0 2
acA3088-57uc 0 4 0 2
acA3088-57um 0 4 0 2
acA3800-10gc 0 2 0 2
acA3800-10gm 0 1 0 1
acA3800-14uc 0 2 0 2
acA3800-14um 0 1 0 1
acA4024-8gc 0 4 0 2
acA4024-8gm 0 4 0 1
acA4024-29uc 0 4 0 2
acA4024-29um 0 4 0 1
acA4096-11gc 0 2 0 2
acA4096-11gm 0 2 0 2
acA4096-30uc 0 4 0 2
acA4096-30ucMED 0 4 0 2
acA4096-30um 0 4 0 2
acA4096-30umMED 0 4 0 2
acA4096-40uc 0 4 0 2
acA4096-40ucMED 0 4 0 2
acA4096-40um 0 4 0 2
acA4096-40umMED 0 4 0 2
acA4112-8gc 0 2 0 2
acA4112-8gm 0 2 0 2
acA4112-20uc 0 4 0 2
acA4112-20ucMED 0 4 0 2
acA4112-20um 0 4 0 2
acA4112-20umMED 0 4 0 2
acA4112-30uc 0 4 0 2
acA4112-30ucMED 0 4 0 2
acA4112-30um 0 4 0 2
acA4112-30umMED 0 4 0 2
acA4600-7gc 0 2 0 2
acA4600-10uc 0 2 0 2
acA5472-5gc 0 4 0 2
acA5472-5gm 0 4 0 1
acA5472-17uc 0 4 0 2
acA5472-17ucMED 0 4 0 2
acA5472-17um 0 4 0 1
boA4096-93cc 16 16 2 2
boA4096-93cm 16 16 2 2
boA4112-68cc 16 16 2 2
boA4112-68cm 16 16 2 2
daA1280-54lc 0 2 0 2
daA1280-54lm 0 2 0 2
daA1280-54uc 0 2 0 2
daA1280-54um 0 2 0 2
daA1600-60lc 0 2 0 2
daA1600-60lm 0 2 0 2
daA1600-60uc 0 2 0 2
daA1600-60um 0 2 0 2
daA1920-15um 0 2 0 2
daA1920-30uc 0 2 0 2
daA1920-30um 0 2 0 2
daA2500-14lc 0 2 0 2
daA2500-14lm 0 2 0 2
daA2500-14uc 0 2 0 2
daA2500-14um 0 2 0 2
daA2500-60mc 不支持 Image ROI 功能 - - -
daA2500-60mci 0 8 0 8
daA4200-30mci 0 8 0 8
puA1280-54uc 0 2 0 2
puA1280-54um 0 2 0 2
puA1600-60uc 0 2 0 2
puA1600-60um 0 2 0 2
puA1920-30uc 0 2 0 2
puA1920-30um 0 2 0 2
puA2500-14uc 0 2 0 2
puA2500-14um 0 2 0 2

Image ROI 特点#

显示所有相机型号

相机型号 缩小高度值可以显著提高帧速率
a2A1920-51gcBAS
a2A1920-51gcPRO
a2A1920-51gmBAS
a2A1920-51gmPRO
a2A1920-160ucBAS
a2A1920-160ucPRO
a2A1920-160umBAS
a2A1920-160umPRO
a2A2590-22gcBAS
a2A2590-22gcPRO
a2A2590-22gmBAS
a2A2590-22gmPRO
a2A2590-60ucBAS
a2A2590-60ucPRO
a2A2590-60umBAS
a2A2590-60umPRO
a2A3840-13gcBAS
a2A3840-13gcPRO
a2A3840-13gmBAS
a2A3840-13gmPRO
a2A3840-45ucBAS
a2A3840-45ucPRO
a2A3840-45umBAS
a2A3840-45umPRO
acA640-90gc
acA640-90gm
acA640-90uc
acA640-90um
acA640-120gc
acA640-120gm
acA640-120uc
acA640-120um
acA640-121gm
acA640-300gc
acA640-300gm
acA640-750uc
acA640-750um
acA720-290gc
acA720-290gm
acA720-520uc
acA720-520um
acA780-75gc
acA780-75gm
acA800-200gc
acA800-200gm
acA800-510uc
acA800-510um
acA1280-60gc
acA1280-60gm
acA1300-22gc
acA1300-22gm
acA1300-30gc
acA1300-30gm
acA1300-30uc
acA1300-30um
acA1300-60gc
acA1300-60gm
acA1300-60gmNIR
acA1300-75gc
acA1300-75gm
acA1300-200uc
acA1300-200um
acA1440-73gc
acA1440-73gm
acA1440-220uc
acA1440-220um
acA1600-20gc
acA1600-20gm
acA1600-20uc
acA1600-20um
acA1600-60gc
acA1600-60gm
acA1920-25gc
acA1920-25gm
acA1920-25uc
acA1920-25um
acA1920-40gc
acA1920-40gm
acA1920-40uc
acA1920-40ucMED
acA1920-40um
acA1920-40umMED
acA1920-48gc
acA1920-48gm
acA1920-50gc
acA1920-50gm
acA1920-150uc
acA1920-150um
acA1920-155uc
acA1920-155ucMED
acA1920-155um
acA1920-155umMED
acA2000-50gc
acA2000-50gm
acA2000-50gmNIR
acA2000-165uc
acA2000-165um
acA2000-165umNIR
acA2040-25gc
acA2040-25gm
acA2040-25gmNIR
acA2040-35gc
acA2040-35gm
acA2040-55uc
acA2040-55um
acA2040-90uc
acA2040-90um
acA2040-90umNIR
acA2040-120uc
acA2040-120um
acA2440-20gc
acA2440-20gm
acA2440-35uc
acA2440-35ucMED
acA2440-35um
acA2440-35umMED
acA2440-75uc
acA2440-75ucMED
acA2440-75um
acA2440-75umMED
acA2500-14gc
acA2500-14gm
acA2500-14uc
acA2500-14um
acA2500-20gc
acA2500-20gcMED
acA2500-20gm
acA2500-20gmMED
acA2500-60uc
acA2500-60um
acA3088-16gc
acA3088-16gm
acA3088-57uc
acA3088-57um
acA3800-10gc
acA3800-10gm
acA3800-14uc
acA3800-14um
acA4024-8gc
acA4024-8gm
acA4024-29uc
acA4024-29um
acA4096-11gc
acA4096-11gm
acA4096-30uc
acA4096-30ucMED
acA4096-30um
acA4096-30umMED
acA4096-40uc
acA4096-40ucMED
acA4096-40um
acA4096-40umMED
acA4112-8gc
acA4112-8gm
acA4112-20uc
acA4112-20ucMED
acA4112-20um
acA4112-20umMED
acA4112-30uc
acA4112-30ucMED
acA4112-30um
acA4112-30umMED
acA4600-7gc
acA4600-10uc
acA5472-5gc
acA5472-5gm
acA5472-17uc
acA5472-17ucMED
acA5472-17um
boA4096-93cc
boA4096-93cm
boA4112-68cc
boA4112-68cm
daA1280-54lc
daA1280-54lm
daA1280-54uc
daA1280-54um
daA1600-60lc
daA1600-60lm
daA1600-60uc
daA1600-60um
daA1920-15um
daA1920-30uc
daA1920-30um
daA2500-14lc
daA2500-14lm
daA2500-14uc
daA2500-14um
daA2500-60mc 不支持 Image ROI 功能
daA2500-60mci
daA4200-30mci
puA1280-54uc
puA1280-54um
puA1600-60uc
puA1600-60um
puA1920-30uc
puA1920-30um
puA2500-14uc
puA2500-14um

示例代码#

ace classic/U/L GigE 相机#

// Set the width to the maximum value
int64_t maxWidth = camera.Width.GetMax();
camera.Width.SetValue(maxWidth);
// Set the height to 500
camera.Height.SetValue(500);
// Set the offset to 0,0
camera.OffsetX.SetValue(0);
camera.OffsetY.SetValue(0);
INodeMap& nodemap = camera.GetNodeMap();
// Set the width to the maximum value
int64_t maxWidth = CIntegerPtr(nodemap.GetNode("Width"))->GetMax();
CIntegerPtr(nodemap.GetNode("Width"))->SetValue(maxWidth);
// Set the height to 500
CIntegerPtr(nodemap.GetNode("Height"))->SetValue(500);
// Set the offset to 0,0
CIntegerPtr(nodemap.GetNode("OffsetX"))->SetValue(0);
CIntegerPtr(nodemap.GetNode("OffsetY"))->SetValue(0);
INodeMap& nodemap = camera.GetNodeMap();
// Set the width to the maximum value
int64_t maxWidth = CIntegerParameter(nodemap, "Width").GetMax();
CIntegerParameter(nodemap, "Width").SetValue(maxWidth);
// Set the height to 500
CIntegerParameter(nodemap, "Height").SetValue(500);
// Set the offset to 0,0
CIntegerParameter(nodemap, "OffsetX").SetValue(0);
CIntegerParameter(nodemap, "OffsetY").SetValue(0);
// Set the width to the maximum value
Int64 maxWidth = camera.Parameters[PLCamera.Width].GetMaximum();
camera.Parameters[PLCamera.Width].SetValue(maxWidth);
// Set the height to 500
camera.Parameters[PLCamera.Height].SetValue(500);
// Set the offset to 0,0
camera.Parameters[PLCamera.OffsetX].SetValue(0);
camera.Parameters[PLCamera.OffsetY].SetValue(0);
// Set the width to the maximum value
Int64 maxWidth = Pylon.DeviceGetIntegerFeatureMax(hdev, "Width");
Pylon.DeviceSetIntegerFeature(hdev, "Width", maxWidth);
// Set the height to 500
Pylon.DeviceSetIntegerFeature(hdev, "Height", 500);
// Set the offset to 0,0
Pylon.DeviceSetIntegerFeature(hdev, "OffsetX", 0);
Pylon.DeviceSetIntegerFeature(hdev, "OffsetY", 0);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
int64_t maxWidth = 0;
/* Set the width to the maximum value */
errRes = PylonDeviceGetIntegerFeatureMax(hdev, "Width", &maxWidth);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "Width", maxWidth);
CHECK(errRes);
/* Set the height to 500 */
errRes = PylonDeviceSetIntegerFeature(hdev, "Height", 500);
CHECK(errRes);
/* Set the offset to 0,0 */
errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetX", 0);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetY", 0);
CHECK(errRes);

其他相机#

// Set the width to the maximum value
int64_t maxWidth = camera.WidthMax.GetValue();
camera.Width.SetValue(maxWidth);
// Set the height to 500
camera.Height.SetValue(500);
// Set the offset to 0
camera.OffsetX.SetValue(0);
camera.OffsetY.SetValue(0);
INodeMap& nodemap = camera.GetNodeMap();
// Set the width to the maximum value
int64_t maxWidth = CIntegerPtr(nodemap.GetNode("WidthMax"))->GetValue();
CIntegerPtr(nodemap.GetNode("Width"))->SetValue(maxWidth);
// Set the height to 500
CIntegerPtr(nodemap.GetNode("Height"))->SetValue(500);
// Set the offset to 0
CIntegerPtr(nodemap.GetNode("OffsetX"))->SetValue(0);
CIntegerPtr(nodemap.GetNode("OffsetY"))->SetValue(0);
INodeMap& nodemap = camera.GetNodeMap();
// Set the width to the maximum value
int64_t maxWidth = CIntegerParameter(nodemap, "WidthMax").GetValue();
CIntegerParameter(nodemap, "Width").SetValue(maxWidth);
// Set the height to 500
CIntegerParameter(nodemap, "Height").SetValue(500);
// Set the offset to 0
CIntegerParameter(nodemap, "OffsetX").SetValue(0);
CIntegerParameter(nodemap, "OffsetY").SetValue(0);
// Set the width to the maximum value
Int64 maxWidth = camera.Parameters[PLCamera.WidthMax].GetValue();
camera.Parameters[PLCamera.Width].SetValue(maxWidth);
// Set the height to 500
camera.Parameters[PLCamera.Height].SetValue(500);
// Set the offset to 0
camera.Parameters[PLCamera.OffsetX].SetValue(0);
camera.Parameters[PLCamera.OffsetY].SetValue(0);
// Set the width to the maximum value
Int64 maxWidth = Pylon.DeviceGetIntegerFeature(hdev, "WidthMax");
Pylon.DeviceSetIntegerFeature(hdev, "Width", maxWidth);
// Set the height to 500
Pylon.DeviceSetIntegerFeature(hdev, "Height", 500);
// Set the offset to 0
Pylon.DeviceSetIntegerFeature(hdev, "OffsetX", 0);
Pylon.DeviceSetIntegerFeature(hdev, "OffsetY", 0);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
int64_t maxWidth = 0;
/* Set the width to the maximum value */
errRes = PylonDeviceGetIntegerFeature(hdev, "WidthMax", &maxWidth);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "Width", maxWidth);
CHECK(errRes);
/* Set the height to 500 */
errRes = PylonDeviceSetIntegerFeature(hdev, "Height", 500);
CHECK(errRes);
/* Set the offset to 0 */
errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetX", 0);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetY", 0);
CHECK(errRes);

您也可以使用 pylon Viewer 轻松设置参数。