This website is being translated through machine translation by a third-party service. Basler does not warrant the accuracy, reliability or timeliness of any information translated by this system and will not accept liability for loss or damage incurred as a result. Content that has not yet been translated appears in English. Switch to English version
To center the image horizontally, execute the BslCenterX command.
The camera adjusts the OffsetX parameter value to center the image ROIhorizontally. This is a one-time operation. When you change the width of the image ROI, you must execute the command again.
To center the image vertically, execute the BslCenterY command.
The camera adjusts the OffsetY parameter value to center the image ROIvertically. This is a one-time operation. When you change the height of the image ROI, you must execute the command again.
// Center the image ROIcamera.BslCenterX.Execute();camera.BslCenterY.Execute();
INodeMap&nodemap=camera.GetNodeMap();// Center the image ROICCommandParameter(nodemap,"BslCenterX").Execute();CCommandParameter(nodemap,"BslCenterY").Execute();
// Center the image ROIcamera.Parameters[PLCamera.BslCenterX].Execute();camera.Parameters[PLCamera.BslCenterY].Execute();
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=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 ROIcamera.BslCenterX.Execute()camera.BslCenterY.Execute()
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods *//* Center the image ROI */errRes=PylonDeviceExecuteCommandFeature(hdev,"BslCenterX");CHECK(errRes);errRes=PylonDeviceExecuteCommandFeature(hdev,"BslCenterY");CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.