Stacked Zone Imaging

The Stacked Zone Imaging camera feature allows you to define up to eight zones on the sensor array that will be transmitted as a single image.

Only the pixel data from those zones will be transmitted. This increases the camera's frame rate.

In this topic Hide

Using the Feature

Prerequisites

How It Works

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.

Stacked Zone Imaging Example

The zones always have the same width and are vertically aligned. To configure the ROI zones, Basler recommends the following procedure:

  1. Define a width and a horizontal offset that is valid for all zones.
  2. Define the heights and vertical offsets of the individual zones.

Configuring Stacked Zone Imaging

  1. Set the StackedZoneImagingEnable parameter to true.
    The Stacked Zone Imaging feature is enabled and can be configured.
  2. Set the OffsetX parameter to the desired horizontal offset. The value is applied to all zones.
  3. Set the Width parameter to the desired zone width. The value is applied to all zones.
  4. Set the StackedZoneImagingIndex parameter to the zone that you want to configure, e.g., 1.
  5. Set the StackedZoneImagingZoneEnable parameter to true to enable the zone selected in step 4.
  6. Set the StackedZoneImagingZoneOffsetY parameter to the desired vertical offset. The value is applied to the zone selected in step 4.
  7. Set the StackedZoneImagingZoneHeight parameter to the desired zone height. The value is applied to the zone selected in step 4.
  8. Repeat steps 4 to 7 for every zone you want to configure.

Considerations When Using Stacked Zone Imaging

Sample Code

// 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.