Skip to content

Center X and Center Y#

The Center X and Center Y camera feature allows you to center the image ROI horizontally, vertically, or both.

Using the Feature#

Enabling Center X#

The way you enable Center X varies by camera model.

ace 2 and boost Cameras#

To enable Center X, set the CenterX parameter to true.

The camera adjusts the OffsetX parameter value to center the image ROI horizontally. When you change the width of the image ROI, the OffsetX parameter value automatically adapts. The OffsetX parameter becomes read-only.

Other Cameras#

To enable Center X, execute the BslCenterX command.

The camera adjusts the OffsetX parameter value to center the image ROI horizontally. This is a one-time operation. When you change the width of the image ROI, you must execute the command again.

Enabling Center Y#

The way you enable Center Y varies by camera model.

ace 2 and boost Cameras#

To enable Center Y, set the CenterY parameter to true.

The camera adjusts the OffsetY parameter value to center the image ROI vertically. When you change the height of the image ROI, the OffsetY parameter value automatically adapts. The OffsetY parameter becomes read-only.

Other Cameras#

To enable Center Y, execute the BslCenterY command.

The camera adjusts the OffsetY parameter value to center the image ROI vertically. This is a one-time operation. When you change the height of the image ROI, you must execute the command again.

Specifics#

Show all camera models

Camera Model Parameter Names
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-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 feature not supported
daA1280-54lm Center X and Center Y feature not supported
daA1280-54uc Center X and Center Y feature not supported
daA1280-54um Center X and Center Y feature not supported
daA1600-60lc Center X and Center Y feature not supported
daA1600-60lm Center X and Center Y feature not supported
daA1600-60uc Center X and Center Y feature not supported
daA1600-60um Center X and Center Y feature not supported
daA1920-15um Center X and Center Y feature not supported
daA1920-30uc Center X and Center Y feature not supported
daA1920-30um Center X and Center Y feature not supported
daA2500-14lc Center X and Center Y feature not supported
daA2500-14lm Center X and Center Y feature not supported
daA2500-14uc Center X and Center Y feature not supported
daA2500-14um Center X and Center Y feature not supported
daA2500-60mc Center X and Center Y feature not supported
daA2500-60mci Center X and Center Y feature not supported
daA4200-30mci Center X and Center Y feature not supported
puA1280-54uc Center X and Center Y feature not supported
puA1280-54um Center X and Center Y feature not supported
puA1600-60uc Center X and Center Y feature not supported
puA1600-60um Center X and Center Y feature not supported
puA1920-30uc Center X and Center Y feature not supported
puA1920-30um Center X and Center Y feature not supported
puA2500-14uc Center X and Center Y feature not supported
puA2500-14um Center X and Center Y feature not supported

Sample Code#

ace 2 and boost Cameras#

// 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);

Other Cameras#

// 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);

You can also use the pylon Viewer to easily set the parameters.