Only the pixel data from those zones will be transmitted. This increases the camera's frame rate.
In this topic Hide
The Stacked Zone Imaging feature allows you to define up to eight vertically aligned zones of equal width on the sensor array. When an image is acquired, only the pixel information from within the defined zones is read out of the sensor. The pixel information is then stacked together and transmitted as a single image.
The zones always have the same width and are vertically aligned. To configure the ROI zones, Basler recommends the following procedure:
// Enable stacked zone imaging
camera.StackedZoneImagingEnable.SetValue(true);
// Configure width and offset X for all zones
camera.Width.SetValue(200);
camera.OffsetX.SetValue(100);
// Select zone 1
camera.StackedZoneImagingIndex.SetValue(1);
// Enable the selected zone
camera.StackedZoneImagingZoneEnable.SetValue(true);
// Set the vertical offset for the selected zone
camera.StackedZoneImagingZoneOffsetY.SetValue(100);
// Set the height for the selected zone
camera.StackedZoneImagingZoneHeight.SetValue(100);
// Select zone 2
camera.StackedZoneImagingIndex.SetValue(2);
// Enable the selected zone
camera.StackedZoneImagingZoneEnable.SetValue(true);
// Set the offset Y for the selected zone
camera.StackedZoneImagingZoneOffsetY.SetValue(250);
// Set the height for the selected zone
camera.StackedZoneImagingZoneHeight.SetValue(200);
INodeMap& nodemap = camera.GetNodeMap();
// Enable stacked zone imaging
CBooleanPtr(nodemap.GetNode("StackedZoneImagingEnable"))->SetValue(true);
// Set the width and offset X for all zones
CIntegerPtr(nodemap.GetNode("Width"))->SetValue(200);
CIntegerPtr(nodemap.GetNode("OffsetX"))->SetValue(100);
// Select zone 1
CIntegerPtr(nodemap.GetNode("StackedZoneImagingIndex"))->SetValue(1);
// Enable the selected zone
CBooleanPtr(nodemap.GetNode("StackedZoneImagingZoneEnable"))->SetValue(true);
// Set the offset Y for the selected zone
CIntegerPtr(nodemap.GetNode("StackedZoneImagingZoneOffsetY"))->SetValue(100);
// Set the height for the selected zone
CIntegerPtr(nodemap.GetNode("StackedZoneImagingZoneHeight"))->SetValue(100);
// Select zone 2
CIntegerPtr(nodemap.GetNode("StackedZoneImagingIndex"))->SetValue(2);
// Enable the selected zone
CBooleanPtr(nodemap.GetNode("StackedZoneImagingZoneEnable"))->SetValue(true);
// Set the offset Y for the selected zone
CIntegerPtr(nodemap.GetNode("StackedZoneImagingZoneOffsetY"))->SetValue(250);
// Set the height for the selected zone
CIntegerPtr(nodemap.GetNode("StackedZoneImagingZoneHeight"))->SetValue(200);
// Enable stacked zone imaging
camera.Parameters[PLCamera.StackedZoneImagingEnable].SetValue(true);
// Set the width and offset X for all zones
camera.Parameters[PLCamera.Width].SetValue(200);
camera.Parameters[PLCamera.OffsetX].SetValue(100);
// Select zone 1
camera.Parameters[PLCamera.StackedZoneImagingIndex].SetValue(1);
// Enable the selected zone
camera.Parameters[PLCamera.StackedZoneImagingZoneEnable].SetValue(true);
// Set the offset Y for the selected zone
camera.Parameters[PLCamera.StackedZoneImagingZoneOffsetY].SetValue(100);
// Set the height for the selected zone
camera.Parameters[PLCamera.StackedZoneImagingZoneHeight].SetValue(100);
// Select zone 2
camera.Parameters[PLCamera.StackedZoneImagingIndex].SetValue(2);
// Enable the selected zone
camera.Parameters[PLCamera.StackedZoneImagingZoneEnable].SetValue(true);
// Set the offset Y for the selected zone
camera.Parameters[PLCamera.StackedZoneImagingZoneOffsetY].SetValue(250);
// Set the height for the selected zone
camera.Parameters[PLCamera.StackedZoneImagingZoneHeight].SetValue(200);
// Enable stacked zone imaging
Pylon.DeviceSetBooleanFeature(hdev, "StackedZoneImagingEnable", true);
// Set the width and offset X for all zones
Pylon.DeviceSetIntegerFeature(hdev, "Width", 200);
Pylon.DeviceSetIntegerFeature(hdev, "OffsetX", 100);
// Select zone 1
Pylon.DeviceSetIntegerFeature(hdev, "StackedZoneImagingIndex", 1);
// Enable the selected zone
Pylon.DeviceSetBooleanFeature(hdev, "StackedZoneImagingZoneEnable", true);
// Set the offset Y for the selected zone
Pylon.DeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneOffsetY", 100);
// Set the height for the selected zone
Pylon.DeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneHeight", 100);
// Select zone 2
Pylon.DeviceSetIntegerFeature(hdev, "StackedZoneImagingIndex", 2);
// Enable the selected zone
Pylon.DeviceSetBooleanFeature(hdev, "StackedZoneImagingZoneEnable", true);
// Set the offset Y for the selected zone
Pylon.DeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneOffsetY", 250);
// Set the height for the selected zone
Pylon.DeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneHeight", 200);
/* 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 */
/* Enable stacked zone imaging */
errRes = PylonDeviceSetBooleanFeature(hdev, "StackedZoneImagingEnable", 1);
CHECK(errRes);
/* Set the width and offset X for all zones */
errRes = PylonDeviceSetIntegerFeature(hdev, "Width", 200);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetX", 100);
CHECK(errRes);
/* Select zone 1 */
errRes = PylonDeviceSetIntegerFeature(hdev, "StackedZoneImagingIndex", 1);
CHECK(errRes);
/* Enable the selected zone */
errRes = PylonDeviceSetBooleanFeature(hdev, "StackedZoneImagingZoneEnable", 1);
CHECK(errRes);
/* Set the offset Y for the selected zone */
errRes = PylonDeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneOffsetY", 100);
CHECK(errRes);
/* Set the height for the selected zone */
errRes = PylonDeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneHeight", 100);
CHECK(errRes);
/* Select zone 2 */
errRes = PylonDeviceSetIntegerFeature(hdev, "StackedZoneImagingIndex", 2);
CHECK(errRes);
/* Enable the selected zone */
errRes = PylonDeviceSetBooleanFeature(hdev, "StackedZoneImagingZoneEnable", 1);
CHECK(errRes);
/* Set the offset Y for the selected zone */
errRes = PylonDeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneOffsetY", 250);
CHECK(errRes);
/* Set the height for the selected zone */
errRes = PylonDeviceSetIntegerFeature(hdev, "StackedZoneImagingZoneHeight", 200);
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.