Image ROI#
ROI 是 Region of Interest(即兴趣区的英文首字母缩写,以前为 AOI = 兴趣区)。
如果指定了图像 ROI,则相机将仅传输该区域内的像素数据。在大多数相机上,这会大大提高相机的最大帧速率。
图像 ROI 设置独立于自动功能 ROI 设置。
该功能的使用#
更改 Image ROI 的位置和大小#
启用出厂设置后,相机将设置为默认分辨率。但是,您可以根据需要更改位置和大小。
要更改图像 ROI 的位置和大小,请执行以下操作:
- 确保相机空闲,即未在捕获图像。
- 如果您使用的是 ace Classic/U/L 相机,请将
CenterX
和CenterY
参数设置为false
。 -
使用以下参数指定图像 ROI 的大小:
Width
Height
-
使用以下参数指定图像 ROI 的位置:
OffsetX
OffsetY
图像 ROI 的原点位于传感器阵列的左上角(第 0 列、第 0 行)。
示例:假设您指定了以下设置:
Width
= 16Height
= 10OffsetX
= 2OffsetY
= 6
这将创建以下图像 ROI:
指导准则#
指定图像 ROI 时,请遵循以下准则:
指导准则 | 示例 |
---|---|
OffsetX + Width ≤ WidthMax | 具有 1920 x 1080 像素的传感器:OffsetX + Width ≤ 1920 |
OffsetY + Height ≤ HeightMax | 具有 1920 x 1080 像素的传感器:OffsetY + Height ≤ 1080 |
WidthMax
和 HeightMax
参数值适用于当前的 Binning、Decimation 或 Scaling 设置(如果可用)。
详情#
Image ROI 大小#
相机型号 | 最小宽度 | 最小高度 |
---|---|---|
a2A1920-51gcBAS | 4 | 2 |
a2A1920-51gcPRO | 4 | 2 |
a2A1920-51gmBAS | 4 | 1 |
a2A1920-51gmPRO | 4 | 1 |
a2A1920-160ucBAS | 4 | 2 |
a2A1920-160ucPRO | 4 | 2 |
a2A1920-160umBAS | 4 | 1 |
a2A1920-160umPRO | 4 | 1 |
a2A2448-23gcBAS | 4 | 2 |
a2A2448-23gcPRO | 4 | 2 |
a2A2448-23gmBAS | 4 | 1 |
a2A2448-23gmPRO | 4 | 1 |
a2A2448-75ucBAS | 4 | 2 |
a2A2448-75ucPRO | 4 | 2 |
a2A2448-75umBAS | 4 | 1 |
a2A2448-75umPRO | 4 | 1 |
a2A2590-22gcBAS | 4 | 2 |
a2A2590-22gcPRO | 4 | 2 |
a2A2590-22gmBAS | 4 | 1 |
a2A2590-22gmPRO | 4 | 1 |
a2A2590-60ucBAS | 4 | 2 |
a2A2590-60ucPRO | 4 | 2 |
a2A2590-60umBAS | 4 | 1 |
a2A2590-60umPRO | 4 | 1 |
a2A2600-20gcBAS | 4 | 2 |
a2A2600-20gcPRO | 4 | 2 |
a2A2600-20gmBAS | 4 | 1 |
a2A2600-20gmPRO | 4 | 1 |
a2A2600-64ucBAS | 4 | 2 |
a2A2600-64ucPRO | 4 | 2 |
a2A2600-64umBAS | 4 | 1 |
a2A2600-64umPRO | 4 | 1 |
a2A2840-14gcBAS | 4 | 2 |
a2A2840-14gcPRO | 4 | 2 |
a2A2840-14gmBAS | 4 | 1 |
a2A2840-14gmPRO | 4 | 1 |
a2A2840-48ucBAS | 4 | 2 |
a2A2840-48ucPRO | 4 | 2 |
a2A2840-48umBAS | 4 | 1 |
a2A2840-48umPRO | 4 | 1 |
a2A3840-13gcBAS | 4 | 2 |
a2A3840-13gcPRO | 4 | 2 |
a2A3840-13gmBAS | 4 | 1 |
a2A3840-13gmPRO | 4 | 1 |
a2A3840-45ucBAS | 4 | 2 |
a2A3840-45ucPRO | 4 | 2 |
a2A3840-45umBAS | 4 | 1 |
a2A3840-45umPRO | 4 | 1 |
a2A4096-9gcBAS | 4 | 2 |
a2A4096-9gcPRO | 4 | 2 |
a2A4096-9gmBAS | 4 | 1 |
a2A4096-9gmPRO | 4 | 1 |
a2A4096-30ucBAS | 4 | 2 |
a2A4096-30ucPRO | 4 | 2 |
a2A4096-30umBAS | 4 | 1 |
a2A4096-30umPRO | 4 | 1 |
a2A4200-12gcBAS | 4 | 2 |
a2A4200-12gcPRO | 4 | 2 |
a2A4200-12gmBAS | 4 | 1 |
a2A4200-12gmPRO | 4 | 1 |
a2A4200-40ucBAS | 4 | 2 |
a2A4200-40ucPRO | 4 | 2 |
a2A4200-40umBAS | 4 | 1 |
a2A4200-40umPRO | 4 | 1 |
a2A4504-5gcBAS | 4 | 2 |
a2A4504-5gcPRO | 4 | 2 |
a2A4504-5gmBAS | 4 | 1 |
a2A4504-5gmPRO | 4 | 1 |
a2A4504-18ucBAS | 4 | 2 |
a2A4504-18ucPRO | 4 | 2 |
a2A4504-18umBAS | 4 | 1 |
a2A4504-18umPRO | 4 | 1 |
a2A5320-7gcBAS | 4 | 2 |
a2A5320-7gcPRO | 4 | 2 |
a2A5320-7gmBAS | 4 | 1 |
a2A5320-7gmPRO | 4 | 1 |
a2A5320-23ucBAS | 4 | 2 |
a2A5320-23ucPRO | 4 | 2 |
a2A5320-23umBAS | 4 | 1 |
a2A5320-23umPRO | 4 | 1 |
a2A5328-4gcBAS | 4 | 2 |
a2A5328-4gcPRO | 4 | 2 |
a2A5328-4gmBAS | 4 | 1 |
a2A5328-4gmPRO | 4 | 1 |
a2A5328-15ucBAS | 4 | 2 |
a2A5328-15ucPRO | 4 | 2 |
a2A5328-15umBAS | 4 | 1 |
a2A5328-15umPRO | 4 | 1 |
acA640-90gc | 2 | 2 |
acA640-90uc | 2 | 2 |
acA640-121gm | 1 | 1 |
acA640-300gc | 16 | 2 |
acA640-300gm | 16 | 1 |
acA640-750uc | 16 | 2 |
acA640-750um | 16 | 1 |
acA720-290gc | 2 | 2 |
acA720-290gm | 1 | 1 |
acA720-520uc | 2 | 2 |
acA720-520um | 1 | 1 |
acA800-200gc | 16 | 2 |
acA800-200gm | 16 | 1 |
acA800-510uc | 16 | 2 |
acA800-510um | 16 | 1 |
acA1280-60gc | 2 | 2 |
acA1280-60gm | 1 | 1 |
acA1300-60gc | 2 | 2 |
acA1300-60gm | 1 | 1 |
acA1300-60gmNIR | 1 | 1 |
acA1300-75gc | 16 | 2 |
acA1300-75gm | 16 | 1 |
acA1300-200uc | 16 | 2 |
acA1300-200um | 16 | 1 |
acA1440-73gc | 2 | 2 |
acA1440-73gm | 1 | 1 |
acA1440-220uc | 2 | 2 |
acA1440-220um | 1 | 1 |
acA1600-20gc | 2 | 2 |
acA1600-20uc | 2 | 2 |
acA1600-60gc | 2 | 2 |
acA1600-60gm | 1 | 1 |
acA1920-25gc | 64 | 64 |
acA1920-25gm | 64 | 64 |
acA1920-25uc | 64a | 64a |
acA1920-25um | 64a | 64a |
acA1920-40gc | 2 | 2 |
acA1920-40gm | 1 | 1 |
acA1920-40uc | 4 | 2 |
acA1920-40ucMED | 4 | 2 |
acA1920-40um | 4 | 1 |
acA1920-40umMED | 4 | 1 |
acA1920-48gc | 32 | 2 |
acA1920-48gm | 32 | 1 |
acA1920-50gc | 2 | 2 |
acA1920-50gm | 1 | 1 |
acA1920-150uc | 32 | 2 |
acA1920-150um | 32 | 1 |
acA1920-155uc | 4 | 2 |
acA1920-155ucMED | 4 | 2 |
acA1920-155um | 4 | 1 |
acA1920-155umMED | 4 | 1 |
acA2000-50gc | 2 | 2 |
acA2000-50gm | 1 | 1 |
acA2000-50gmNIR | 1 | 1 |
acA2000-165uc | 8 | 2 |
acA2000-165um | 8 | 1 |
acA2000-165umNIR | 8 | 1 |
acA2040-25gc | 2 | 2 |
acA2040-25gm | 1 | 1 |
acA2040-25gmNIR | 1 | 1 |
acA2040-35gc | 2 | 2 |
acA2040-35gm | 1 | 1 |
acA2040-55uc | 4 | 2 |
acA2040-55um | 4 | 1 |
acA2040-90uc | 8 | 2 |
acA2040-90um | 8 | 1 |
acA2040-90umNIR | 8 | 1 |
acA2040-120uc | 4 | 2 |
acA2040-120um | 4 | 1 |
acA2440-20gc | 2 | 2 |
acA2440-20gm | 1 | 1 |
acA2440-35uc | 4 | 2 |
acA2440-35ucMED | 4 | 2 |
acA2440-35um | 4 | 1 |
acA2440-35umMED | 4 | 1 |
acA2440-75uc | 4 | 2 |
acA2440-75ucMED | 4 | 2 |
acA2440-75um | 4 | 1 |
acA2440-75umMED | 4 | 1 |
acA2500-14gc | 64 | 64 |
acA2500-14gm | 64 | 64 |
acA2500-14uc | 64a | 64a |
acA2500-14um | 64a | 64a |
acA2500-20gc | 32 | 2 |
acA2500-20gcMED | 32 | 2 |
acA2500-20gm | 32 | 1 |
acA2500-20gmMED | 32 | 1 |
acA2500-60uc | 32 | 1 |
acA2500-60um | 32 | 1 |
acA3088-16gc | 376 | 320 |
acA3088-16gm | 376 | 320 |
acA3088-57uc | 376 | 320 |
acA3088-57ucMED | 376 | 320 |
acA3088-57um | 376 | 320 |
acA3088-57umMED | 376 | 320 |
acA3800-10gc | 2 | 2 |
acA3800-10gm | 1 | 1 |
acA3800-14uc | 64 | 64 |
acA3800-14um | 64a | 64a |
acA4024-8gc | 8 | 6 |
acA4024-8gm | 8 | 5 |
acA4024-29uc | 8 | 6 |
acA4024-29um | 8 | 5 |
acA4096-11gc | 16 | 2 |
acA4096-11gm | 16 | 1 |
acA4096-30uc | 4 | 2 |
acA4096-30ucMED | 4 | 2 |
acA4096-30um | 4 | 1 |
acA4096-30umMED | 4 | 1 |
acA4096-40uc | 4 | 2 |
acA4096-40ucMED | 4 | 2 |
acA4096-40um | 4 | 1 |
acA4096-40umMED | 4 | 1 |
acA4112-8gc | 16 | 2 |
acA4112-8gm | 16 | 1 |
acA4112-20uc | 4 | 2 |
acA4112-20ucMED | 4 | 2 |
acA4112-20um | 4 | 1 |
acA4112-20umMED | 4 | 1 |
acA4112-30uc | 4 | 2 |
acA4112-30ucMED | 4 | 2 |
acA4112-30um | 4 | 1 |
acA4112-30umMED | 4 | 1 |
acA4600-7gc | 2 | 2 |
acA4600-10uc | 64 | 64 |
acA5472-5gc | 8 | 6 |
acA5472-5gm | 8 | 5 |
acA5472-17uc | 8 | 6 |
acA5472-17ucMED | 8 | 6 |
acA5472-17um | 8 | 5 |
acA5472-17umMED | 8 | 5 |
boA4096-93cc | 48 | 2 |
boA4096-93cm | 48 | 2 |
boA4112-68cc | 48 | 2 |
boA4112-68cm | 48 | 2 |
boA4500-45cc | 48 | 2 |
boA4500-45cm | 48 | 2 |
boA4504-100cc | 96 / 48b | 2 |
boA4504-100cm | 96 / 48b | 2 |
boA5320-150cc | 96 / 48b | 2 |
boA5320-150cm | 96 / 48b | 2 |
boA5328-100cc | 96 / 48b | 2 |
boA5328-100cm | 96 / 48b | 2 |
boA6500-36cc | 48 | 2 |
boA6500-36cm | 48 | 2 |
boA8100-16cc | 48 | 2 |
boA8100-16cm | 48 | 2 |
daA1280-54uc | 16 | 8 |
daA1280-54um | 16 | 8 |
daA1600-60uc | 16 | 8 |
daA1600-60um | 16 | 8 |
daA1920-15um | 16 | 8 |
daA1920-30uc | 16 | 8 |
daA1920-30um | 16 | 8 |
daA1920-160uc | 2 | 6 |
daA1920-160um | 4 | 1 |
daA2448-70uc | 2 | 6 |
daA2448-70um | 4 | 3 |
daA2500-14uc | 16 | 8 |
daA2500-14um | 16 | 8 |
daA3840-45uc | 2 | 6 |
daA3840-45um | 4 | 4 |
puA1280-54uc | 16 | 8 |
puA1280-54um | 16 | 8 |
puA1600-60uc | 16 | 8 |
puA1600-60um | 16 | 8 |
puA1920-30uc | 4 | 4 |
puA1920-30um | 4 | 4 |
puA2500-14uc | 4 | 4 |
puA2500-14um | 4 | 4 |
-
启用像素合并后,最小宽度和最小高度将减小。值四舍五入到最接近的整数。示例:如果您将水平像素合并配置为 3,则有效最小宽度为 64 / 3 = 21.333 ≈ 22。
-
10-bit pixel formats / other pixel formats
Image ROI 特点#
相机型号 | 缩小高度值可以显著提高帧速率 |
---|---|
a2A1920-51gcBAS | 是 |
a2A1920-51gcPRO | 是 |
a2A1920-51gmBAS | 是 |
a2A1920-51gmPRO | 是 |
a2A1920-160ucBAS | 是 |
a2A1920-160ucPRO | 是 |
a2A1920-160umBAS | 是 |
a2A1920-160umPRO | 是 |
a2A2448-23gcBAS | 是 |
a2A2448-23gcPRO | 是 |
a2A2448-23gmBAS | 是 |
a2A2448-23gmPRO | 是 |
a2A2448-75ucBAS | 是 |
a2A2448-75ucPRO | 是 |
a2A2448-75umBAS | 是 |
a2A2448-75umPRO | 是 |
a2A2590-22gcBAS | 无 |
a2A2590-22gcPRO | 无 |
a2A2590-22gmBAS | 无 |
a2A2590-22gmPRO | 无 |
a2A2590-60ucBAS | 无 |
a2A2590-60ucPRO | 无 |
a2A2590-60umBAS | 无 |
a2A2590-60umPRO | 无 |
a2A2600-20gcBAS | 是 |
a2A2600-20gcPRO | 是 |
a2A2600-20gmBAS | 是 |
a2A2600-20gmPRO | 是 |
a2A2600-64ucBAS | 是 |
a2A2600-64ucPRO | 是 |
a2A2600-64umBAS | 是 |
a2A2600-64umPRO | 是 |
a2A2840-14gcBAS | 是 |
a2A2840-14gcPRO | 是 |
a2A2840-14gmBAS | 是 |
a2A2840-14gmPRO | 是 |
a2A2840-48ucBAS | 是 |
a2A2840-48ucPRO | 是 |
a2A2840-48umBAS | 是 |
a2A2840-48umPRO | 是 |
a2A3840-13gcBAS | 无 |
a2A3840-13gcPRO | 无 |
a2A3840-13gmBAS | 无 |
a2A3840-13gmPRO | 无 |
a2A3840-45ucBAS | 无 |
a2A3840-45ucPRO | 无 |
a2A3840-45umBAS | 无 |
a2A3840-45umPRO | 无 |
a2A4096-9gcBAS | 是 |
a2A4096-9gcPRO | 是 |
a2A4096-9gmBAS | 是 |
a2A4096-9gmPRO | 是 |
a2A4096-30ucBAS | 是 |
a2A4096-30ucPRO | 是 |
a2A4096-30umBAS | 是 |
a2A4096-30umPRO | 是 |
a2A4200-12gcBAS | 是 |
a2A4200-12gcPRO | 是 |
a2A4200-12gmBAS | 是 |
a2A4200-12gmPRO | 是 |
a2A4200-40ucBAS | 是 |
a2A4200-40ucPRO | 是 |
a2A4200-40umBAS | 是 |
a2A4200-40umPRO | 是 |
a2A4504-5gcBAS | 是 |
a2A4504-5gcPRO | 是 |
a2A4504-5gmBAS | 是 |
a2A4504-5gmPRO | 是 |
a2A4504-18ucBAS | 是 |
a2A4504-18ucPRO | 是 |
a2A4504-18umBAS | 是 |
a2A4504-18umPRO | 是 |
a2A5320-7gcBAS | 是 |
a2A5320-7gcPRO | 是 |
a2A5320-7gmBAS | 是 |
a2A5320-7gmPRO | 是 |
a2A5320-23ucBAS | 是 |
a2A5320-23ucPRO | 是 |
a2A5320-23umBAS | 是 |
a2A5320-23umPRO | 是 |
a2A5328-4gcBAS | 是 |
a2A5328-4gcPRO | 是 |
a2A5328-4gmBAS | 是 |
a2A5328-4gmPRO | 是 |
a2A5328-15ucBAS | 是 |
a2A5328-15ucPRO | 是 |
a2A5328-15umBAS | 是 |
a2A5328-15umPRO | 是 |
acA640-90gc | 是 |
acA640-90uc | 是 |
acA640-121gm | 是 |
acA640-300gc | 是 |
acA640-300gm | 是 |
acA640-750uc | 是 |
acA640-750um | 是 |
acA720-290gc | 是 |
acA720-290gm | 是 |
acA720-520uc | 是 |
acA720-520um | 是 |
acA800-200gc | 是 |
acA800-200gm | 是 |
acA800-510uc | 是 |
acA800-510um | 是 |
acA1280-60gc | 是 |
acA1280-60gm | 是 |
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-20uc | 是 |
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-57ucMED | 是 |
acA3088-57um | 是 |
acA3088-57umMED | 是 |
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 | 无 |
acA5472-17umMED | 无 |
boA4096-93cc | 是 |
boA4096-93cm | 是 |
boA4112-68cc | 是 |
boA4112-68cm | 是 |
boA4500-45cc | 是 |
boA4500-45cm | 是 |
boA4504-100cc | 是 |
boA4504-100cm | 是 |
boA5320-150cc | 是 |
boA5320-150cm | 是 |
boA5328-100cc | 是 |
boA5328-100cm | 是 |
boA6500-36cc | 是 |
boA6500-36cm | 是 |
boA8100-16cc | 是 |
boA8100-16cm | 是 |
daA1280-54uc | 是 |
daA1280-54um | 是 |
daA1600-60uc | 是 |
daA1600-60um | 是 |
daA1920-15um | 是 |
daA1920-30uc | 是 |
daA1920-30um | 是 |
daA1920-160uc | 是 |
daA1920-160um | 是 |
daA2448-70uc | 是 |
daA2448-70um | 是 |
daA2500-14uc | 是 |
daA2500-14um | 是 |
daA3840-45uc | 是 |
daA3840-45um | 是 |
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 = 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);
/* 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 = 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);
/* 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 轻松设置参数。