Stacked ROI#
Only the pixel data from those zones will be transmitted. This increases the camera's frame rate.
The Stacked ROI feature is similar to the Stacked Zone Imaging feature, which is only available on ace classic cameras.
Using the Feature#
Prerequisites#
- The camera must be idle, i.e., not capturing images.
- The Sequencer feature must be disabled.
How It Works#
The Stacked ROI feature allows you to define vertically aligned zones of equal width on the sensor array. The maximum number of zones depends on your camera model.
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 zones, Basler recommends the following procedure:
- Define a width and a horizontal offset that is valid for all zones.
- Define the heights and vertical offsets of the individual zones.
Configuring the ROI Zones#
- Set the OffsetX parameter to the desired horizontal offset. The value is applied to all zones.
- Set the Width parameter to the desired zone width. The value is applied to all zones.
- Set the ROIZoneSelector parameter to the zone that you want to configure, e.g., Zone0.
- Set the ROIZoneOffset parameter to the desired vertical offset. The value is applied to the zone selected in step 4.
- Set the ROIZoneSize parameter to the desired zone height. The value is applied to the zone selected in step 4.
- Set the ROIZoneMode parameter to On to enable the zone.
- Repeat steps 3 to 6 for every zone you want to configure.
Considerations When Using the Stacked ROI Feature#
- You can enable the zones in any order you like. For example, you can enable zones 1, 3, and 5 and disable zones 0, 2, and 4.
- You can place the zones freely around the sensor. For example, you can place zone 0 near the bottom, zone 2 near the top, and zone 1 in the middle. However, the camera always starts reading out and transmitting pixel data from the topmost zone on the sensor and then proceeds towards the bottom.
- You can define vertically overlapping zones. If two zones overlap, they are transmitted as a single merged zone. The pixel data from the area of overlap is read out and transmitted only once.
- When at least one zone has been defined, the following parameters become read-only:
- OffsetY
The parameter is set to the vertical offset of the topmost zone. - Height
The parameter is set to the height of the final image, i.e., the sum of the heights of all zones. - CenterY
- All parameters related to the Sequencer feature.
- OffsetY
- If you have configured a zone and then enable binning, the position and the size of the zone are adapted automatically. The parameter values are divided by the corresponding binning factor and rounded down.
- If you disable all zones after using the Stacked ROI feature, the size and position of the image ROI is set to the size and position of the zone that was disabled last. For example, assume zones 0, 1, and 2 are enabled. Then, you disable the zones in the following order: 2, 1, 0. As a result, the size and position of the image ROI is set to the size and position of the disabled zone 0.
Specifics#
Camera Model | Maximum Number of ROI Zones |
---|---|
a2A1920-51gcBAS | Stacked ROI feature not supported |
a2A1920-51gmBAS | Stacked ROI feature not supported |
a2A1920-160ucBAS | Stacked ROI feature not supported |
a2A1920-160umBAS | Stacked ROI feature not supported |
acA640-90gc | Stacked ROI feature not supported |
acA640-90gm | Stacked ROI feature not supported |
acA640-90uc | Stacked ROI feature not supported |
acA640-90um | Stacked ROI feature not supported |
acA640-120gc | Stacked ROI feature not supported |
acA640-120gm | Stacked ROI feature not supported |
acA640-120uc | Stacked ROI feature not supported |
acA640-120um | Stacked ROI feature not supported |
acA640-121gm | Stacked ROI feature not supported |
acA640-300gc | 8 |
acA640-300gm | 8 |
acA640-750uc | 8 |
acA640-750um | 8 |
acA720-290gc | Stacked ROI feature not supported |
acA720-290gm | Stacked ROI feature not supported |
acA720-520uc | Stacked ROI feature not supported |
acA720-520um | Stacked ROI feature not supported |
acA780-75gc | Stacked ROI feature not supported |
acA780-75gm | Stacked ROI feature not supported |
acA800-200gc | 8 |
acA800-200gm | 8 |
acA800-510uc | 8 |
acA800-510um | 8 |
acA1280-60gc | Stacked ROI feature not supported |
acA1280-60gm | Stacked ROI feature not supported |
acA1300-22gc | Stacked ROI feature not supported |
acA1300-22gm | Stacked ROI feature not supported |
acA1300-30gc | Stacked ROI feature not supported |
acA1300-30gm | Stacked ROI feature not supported |
acA1300-30uc | Stacked ROI feature not supported |
acA1300-30um | Stacked ROI feature not supported |
acA1300-60gc | Stacked ROI feature not supported |
acA1300-60gm | Stacked ROI feature not supported |
acA1300-60gmNIR | Stacked ROI feature not supported |
acA1300-75gc | Stacked ROI feature not supported |
acA1300-75gm | Stacked ROI feature not supported |
acA1300-200uc | 8 |
acA1300-200um | 8 |
acA1440-73gc | Stacked ROI feature not supported |
acA1440-73gm | Stacked ROI feature not supported |
acA1440-220uc | 2 |
acA1440-220um | 2 |
acA1600-20gc | Stacked ROI feature not supported |
acA1600-20gm | Stacked ROI feature not supported |
acA1600-20uc | Stacked ROI feature not supported |
acA1600-20um | Stacked ROI feature not supported |
acA1600-60gc | Stacked ROI feature not supported |
acA1600-60gm | Stacked ROI feature not supported |
acA1920-25gc | Stacked ROI feature not supported |
acA1920-25gm | Stacked ROI feature not supported |
acA1920-25uc | Stacked ROI feature not supported |
acA1920-25um | Stacked ROI feature not supported |
acA1920-40gc | Stacked ROI feature not supported |
acA1920-40gm | Stacked ROI feature not supported |
acA1920-40uc | Stacked ROI feature not supported |
acA1920-40ucMED | Stacked ROI feature not supported |
acA1920-40um | Stacked ROI feature not supported |
acA1920-40umMED | Stacked ROI feature not supported |
acA1920-48gc | Stacked ROI feature not supported |
acA1920-48gm | Stacked ROI feature not supported |
acA1920-50gc | Stacked ROI feature not supported |
acA1920-50gm | Stacked ROI feature not supported |
acA1920-150uc | 8 |
acA1920-150um | 8 |
acA1920-155uc | 4 |
acA1920-155ucMED | 4 |
acA1920-155um | 4 |
acA1920-155umMED | 4 |
acA2000-50gc | Stacked ROI feature not supported |
acA2000-50gm | Stacked ROI feature not supported |
acA2000-50gmNIR | Stacked ROI feature not supported |
acA2000-165uc | Stacked ROI feature not supported |
acA2000-165um | Stacked ROI feature not supported |
acA2000-165umNIR | Stacked ROI feature not supported |
acA2040-25gc | Stacked ROI feature not supported |
acA2040-25gm | Stacked ROI feature not supported |
acA2040-25gmNIR | Stacked ROI feature not supported |
acA2040-35gc | Stacked ROI feature not supported |
acA2040-35gm | Stacked ROI feature not supported |
acA2040-55uc | Stacked ROI feature not supported |
acA2040-55um | Stacked ROI feature not supported |
acA2040-90uc | Stacked ROI feature not supported |
acA2040-90um | Stacked ROI feature not supported |
acA2040-90umNIR | Stacked ROI feature not supported |
acA2040-120uc | 8 |
acA2040-120um | 8 |
acA2440-20gc | Stacked ROI feature not supported |
acA2440-20gm | Stacked ROI feature not supported |
acA2440-35uc | Stacked ROI feature not supported |
acA2440-35ucMED | Stacked ROI feature not supported |
acA2440-35um | Stacked ROI feature not supported |
acA2440-35umMED | Stacked ROI feature not supported |
acA2440-75uc | 8 |
acA2440-75ucMED | 8 |
acA2440-75um | 8 |
acA2440-75umMED | 8 |
acA2500-14gc | Stacked ROI feature not supported |
acA2500-14gm | Stacked ROI feature not supported |
acA2500-14uc | Stacked ROI feature not supported |
acA2500-14um | Stacked ROI feature not supported |
acA2500-20gc | 8 |
acA2500-20gcMED | 8 |
acA2500-20gm | Stacked ROI feature not supported |
acA2500-20gmMED | 8 |
acA2500-60uc | 8 |
acA2500-60um | 8 |
acA3088-16gc | Stacked ROI feature not supported |
acA3088-16gm | Stacked ROI feature not supported |
acA3088-57uc | Stacked ROI feature not supported |
acA3088-57um | Stacked ROI feature not supported |
acA3800-10gc | Stacked ROI feature not supported |
acA3800-10gm | Stacked ROI feature not supported |
acA3800-14uc | Stacked ROI feature not supported |
acA3800-14um | Stacked ROI feature not supported |
acA4024-8gc | Stacked ROI feature not supported |
acA4024-8gm | Stacked ROI feature not supported |
acA4024-29uc | Stacked ROI feature not supported |
acA4024-29um | Stacked ROI feature not supported |
acA4096-11gc | Stacked ROI feature not supported |
acA4096-11gm | Stacked ROI feature not supported |
acA4096-30uc | Stacked ROI feature not supported |
acA4096-30ucMED | Stacked ROI feature not supported |
acA4096-30um | Stacked ROI feature not supported |
acA4096-30umMED | Stacked ROI feature not supported |
acA4096-40uc | 8 |
acA4096-40ucMED | 8 |
acA4096-40um | 8 |
acA4096-40umMED | 8 |
acA4112-8gc | Stacked ROI feature not supported |
acA4112-8gm | Stacked ROI feature not supported |
acA4112-20uc | Stacked ROI feature not supported |
acA4112-20ucMED | Stacked ROI feature not supported |
acA4112-20um | Stacked ROI feature not supported |
acA4112-20umMED | Stacked ROI feature not supported |
acA4112-30uc | 8 |
acA4112-30ucMED | 8 |
acA4112-30um | 8 |
acA4112-30umMED | 8 |
acA4600-7gc | Stacked ROI feature not supported |
acA4600-10uc | Stacked ROI feature not supported |
acA5472-5gc | Stacked ROI feature not supported |
acA5472-5gm | Stacked ROI feature not supported |
acA5472-17uc | Stacked ROI feature not supported |
acA5472-17um | Stacked ROI feature not supported |
boA4096-93cc | Stacked ROI feature not supported |
boA4096-93cm | Stacked ROI feature not supported |
boA4112-68cc | Stacked ROI feature not supported |
boA4112-68cm | Stacked ROI feature not supported |
daA1280-54lc | Stacked ROI feature not supported |
daA1280-54lm | Stacked ROI feature not supported |
daA1280-54uc | Stacked ROI feature not supported |
daA1280-54um | Stacked ROI feature not supported |
daA1600-60lc | Stacked ROI feature not supported |
daA1600-60lm | Stacked ROI feature not supported |
daA1600-60uc | Stacked ROI feature not supported |
daA1600-60um | Stacked ROI feature not supported |
daA1920-15um | Stacked ROI feature not supported |
daA1920-30uc | Stacked ROI feature not supported |
daA1920-30um | Stacked ROI feature not supported |
daA2500-14lc | Stacked ROI feature not supported |
daA2500-14lm | Stacked ROI feature not supported |
daA2500-14uc | Stacked ROI feature not supported |
daA2500-14um | Stacked ROI feature not supported |
daA2500-60mc | Stacked ROI feature not supported |
puA1280-54uc | Stacked ROI feature not supported |
puA1280-54um | Stacked ROI feature not supported |
puA1600-60uc | Stacked ROI feature not supported |
puA1600-60um | Stacked ROI feature not supported |
puA1920-30uc | Stacked ROI feature not supported |
puA1920-30um | Stacked ROI feature not supported |
puA2500-14uc | Stacked ROI feature not supported |
puA2500-14um | Stacked ROI feature not supported |
Sample Code#
// Configure width and offset X for all zones camera.Width.SetValue(200); camera.OffsetX.SetValue(100); // Select zone 0 camera.ROIZoneSelector.SetValue(ROIZoneSelector_Zone0); // Set the vertical offset for the selected zone camera.ROIZoneOffset.SetValue(100); // Set the height for the selected zone camera.ROIZoneSize.SetValue(100); // Enable the selected zone camera.ROIZoneMode.SetValue(ROIZoneMode_On); // Select zone 1 camera.ROIZoneSelector.SetValue(ROIZoneSelector_Zone1); // Set the vertical offset for the selected zone camera.ROIZoneOffset.SetValue(250); // Set the height for the selected zone camera.ROIZoneSize.SetValue(200); // Enable the selected zone camera.ROIZoneMode.SetValue(ROIZoneMode_On);
INodeMap& nodemap = camera.GetNodeMap(); // Configure width and offset X for all zones CIntegerPtr(nodemap.GetNode("Width"))->SetValue(200); CIntegerPtr(nodemap.GetNode("OffsetX"))->SetValue(100); // Select zone 0 CEnumerationPtr(nodemap.GetNode("ROIZoneSelector"))->FromString("Zone0"); // Set the vertical offset for the selected zone CIntegerPtr(nodemap.GetNode("ROIZoneOffset"))->SetValue(100); // Set the height for the selected zone CIntegerPtr(nodemap.GetNode("ROIZoneSize"))->SetValue(100); // Enable the selected zone CEnumerationPtr(nodemap.GetNode("ROIZoneMode"))->FromString("On"); // Select zone 1 CEnumerationPtr(nodemap.GetNode("ROIZoneSelector"))->FromString("Zone1"); // Set the vertical offset for the selected zone CIntegerPtr(nodemap.GetNode("ROIZoneOffset"))->SetValue(250); // Set the height for the selected zone CIntegerPtr(nodemap.GetNode("ROIZoneSize"))->SetValue(200); // Enable the selected zone CEnumerationPtr(nodemap.GetNode("ROIZoneMode"))->FromString("On");
INodeMap& nodemap = camera.GetNodeMap(); // Configure width and offset X for all zones CIntegerParameter(nodemap, "Width").SetValue(200); CIntegerParameter(nodemap, "OffsetX").SetValue(100); // Select zone 0 CEnumParameter(nodemap, "ROIZoneSelector").SetValue("Zone0"); // Set the vertical offset for the selected zone CIntegerParameter(nodemap, "ROIZoneOffset").SetValue(100); // Set the height for the selected zone CIntegerParameter(nodemap, "ROIZoneSize").SetValue(100); // Enable the selected zone CEnumParameter(nodemap, "ROIZoneMode").SetValue("On"); // Select zone 1 CEnumParameter(nodemap, "ROIZoneSelector").SetValue("Zone1"); // Set the vertical offset for the selected zone CIntegerParameter(nodemap, "ROIZoneOffset").SetValue(250); // Set the height for the selected zone CIntegerParameter(nodemap, "ROIZoneSize").SetValue(200); // Enable the selected zone CEnumParameter(nodemap, "ROIZoneMode").SetValue("On");
// Configure width and offset X for all zones camera.Parameters[PLCamera.Width].SetValue(200); camera.Parameters[PLCamera.OffsetX].SetValue(100); // Select zone 0 camera.Parameters[PLCamera.ROIZoneSelector].SetValue(PLCamera.ROIZoneSelector.Zone0); // Set the vertical offset for the selected zone camera.Parameters[PLCamera.ROIZoneOffset].SetValue(100); // Set the height for the selected zone camera.Parameters[PLCamera.ROIZoneSize].SetValue(100); // Enable the selected zone camera.Parameters[PLCamera.ROIZoneMode].SetValue(PLCamera.ROIZoneMode.On); // Select zone 1 camera.Parameters[PLCamera.ROIZoneSelector].SetValue(PLCamera.ROIZoneSelector.Zone1); // Set the vertical offset for the selected zone camera.Parameters[PLCamera.ROIZoneOffset].SetValue(250); // Set the height for the selected zone camera.Parameters[PLCamera.ROIZoneSize].SetValue(200); // Enable the selected zone camera.Parameters[PLCamera.ROIZoneMode].SetValue(PLCamera.ROIZoneMode.On);
// Configure width and offset X for all zones Pylon.DeviceSetIntegerFeature(hdev, "Width", 200); Pylon.DeviceSetIntegerFeature(hdev, "OffsetX", 100); // Select zone 0 Pylon.DeviceFeatureFromString(hdev, "ROIZoneSelector", "Zone0"); // Set the vertical offset for the selected zone Pylon.DeviceSetIntegerFeature(hdev, "ROIZoneOffset", 100); // Set the height for the selected zone Pylon.DeviceSetIntegerFeature(hdev, "ROIZoneSize", 100); // Enable the selected zone Pylon.DeviceFeatureFromString(hdev, "ROIZoneMode", "On"); // Select zone 1 Pylon.DeviceFeatureFromString(hdev, "ROIZoneSelector", "Zone1"); // Set the vertical offset for the selected zone Pylon.DeviceSetIntegerFeature(hdev, "ROIZoneOffset", 250); // Set the height for the selected zone Pylon.DeviceSetIntegerFeature(hdev, "ROIZoneSize", 200); // Enable the selected zone Pylon.DeviceFeatureFromString(hdev, "ROIZoneMode", "On");
/* 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 */ /* Configure width and offset X for all zones */ errRes = PylonDeviceSetIntegerFeature(hdev, "Width", 200); CHECK(errRes); errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetX", 100); CHECK(errRes); /* Select zone 0 */ errRes = PylonDeviceFeatureFromString(hdev, "ROIZoneSelector", "Zone0"); CHECK(errRes); /* Set the vertical offset for the selected zone */ errRes = PylonDeviceSetIntegerFeature(hdev, "ROIZoneOffset", 100); CHECK(errRes); /* Set the height for the selected zone */ errRes = PylonDeviceSetIntegerFeature(hdev, "ROIZoneSize", 100); CHECK(errRes); /* Enable the selected zone */ errRes = PylonDeviceFeatureFromString(hdev, "ROIZoneMode", "On"); CHECK(errRes); /* Select zone 1 */ errRes = PylonDeviceFeatureFromString(hdev, "ROIZoneSelector", "Zone1"); CHECK(errRes); /* Set the vertical offset for the selected zone */ errRes = PylonDeviceSetIntegerFeature(hdev, "ROIZoneOffset", 250); CHECK(errRes); /* Set the height for the selected zone */ errRes = PylonDeviceSetIntegerFeature(hdev, "ROIZoneSize", 200); CHECK(errRes); /* Enable the selected zone */ errRes = PylonDeviceFeatureFromString(hdev, "ROIZoneMode", "On"); CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.