Center X and Center Y (BCON for MIPI)#
该功能的使用#
Using Center X#
To center the image horizontally, execute the BslCenterX
command.
相机调整 OffsetX
参数值,使 image ROI 水平居中。这是一次性操作。更改 image ROI 的 width 时,必须再次执行该命令。
Using Center Y#
To center the image vertically, execute the BslCenterY
command.
相机调整 OffsetY
参数值使 image ROI 垂直居中。这是一次性操作。更改 image ROI 的 height 时,必须再次执行该命令。
示例代码#
// Center the image ROI
camera.BslCenterX.Execute();
camera.BslCenterY.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Center the image ROI
CCommandParameter(nodemap, "BslCenterX").Execute();
CCommandParameter(nodemap, "BslCenterY").Execute();
/* 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);
You can also use the pylon Viewer to easily set the parameters.