跳转到内容

Center X and Center Y#

相机的 Center X and Center Y 功能使您可以水平和/或垂直地将图像 ROI 居中。

该功能的使用#

启用 Center X#

启用 Center X 的方式因相机型号而异。

ace 2 和 boost 相机#

要启用 Center X,请将 CenterX 参数设置为 true

相机调整 OffsetX 参数值,使 image ROI 水平居中。更改 image ROI 的 width 时,OffsetX 参数值会自动调整。OffsetX 参数变为只读。

其他相机#

要启用 Center X,请执行 BslCenterX 命令。

相机调整 OffsetX 参数值,使 image ROI 水平居中。这是一次性操作。更改 image ROI 的 width 时,必须再次执行该命令。

启用 Center Y#

启用 Center Y 的方式因相机型号而异。

ace 2 和 boost 相机#

要启用 Center Y,请将 CenterY 参数设置为 true

相机调整 OffsetY 参数值,使 image ROI 垂直居中。更改 image ROI 的 height 时,OffsetY 参数值会自动调整。OffsetY 参数变为只读。

其他相机#

要启用 Center Y,请执行 BslCenterY 命令。

相机调整 OffsetY 参数值使 image ROI 垂直居中。这是一次性操作。更改 image ROI 的 height 时,必须再次执行该命令。

详情#

显示所有相机型号

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

示例代码#

ace 2 和 boost 相机#

// Center the image ROI
camera.BslCenterX.Execute();
camera.BslCenterY.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Center the image ROI
CCommandPtr(nodemap.GetNode("BslCenterX"))->Execute();
CCommandPtr(nodemap.GetNode("BslCenterY"))->Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Center the image ROI
CCommandParameter(nodemap, "BslCenterX").Execute();
CCommandParameter(nodemap, "BslCenterY").Execute();
// Center the image ROI
camera.Parameters[PLCamera.BslCenterX].Execute();
camera.Parameters[PLCamera.BslCenterY].Execute();
// Center the image ROI
Pylon.DeviceExecuteCommandFeature(hdev, "BslCenterX");
Pylon.DeviceExecuteCommandFeature(hdev, "BslCenterY");
/* 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 */
/* Center the image ROI */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslCenterX");
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslCenterY");
CHECK(errRes);

其他相机#

// Center the image
camera.CenterX.SetValue(true);
camera.CenterY.SetValue(true);
INodeMap& nodemap = camera.GetNodeMap();
// Center the image
CBooleanPtr(nodemap.GetNode("CenterX"))->SetValue(true);
CBooleanPtr(nodemap.GetNode("CenterY"))->SetValue(true);
INodeMap& nodemap = camera.GetNodeMap();
// Center the image
CBooleanParameter(nodemap, "CenterX").SetValue(true);
CBooleanParameter(nodemap, "CenterY").SetValue(true);
// Center the image
camera.Parameters[PLCamera.CenterX].SetValue(true);
camera.Parameters[PLCamera.CenterY].SetValue(true);
// Center the image
Pylon.DeviceSetBooleanFeature(hdev, "CenterX", true);
Pylon.DeviceSetBooleanFeature(hdev, "CenterY", true);
/* 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 */
/* Center the image */
errRes = PylonDeviceSetBooleanFeature(hdev, "CenterX", 1);
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "CenterY", 1);
CHECK(errRes);

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