Skip to content

Multiple ROI#

The Multiple ROI camera feature allows you to define multiple regions on the sensor array that will be transmitted as a single image.

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

The Multiple ROI feature is similar to the Stacked ROI feature, which is only available on Basler ace GigE and Basler ace USB 3.0 cameras.

Using the Feature#

How It Works#

The Multiple ROI feature allows you to define regions on the sensor array. The maximum number of regions depends on your camera model.

When an image is acquired, only the pixel information from within the regions is read out of the sensor and transmitted as a single image.

Instead of defining the size and position of the regions individually, you define rows and columns on the sensor array. Then, each intersection of a column and a row creates a region.

In the example below, two rows and two columns have been defined. This creates four regions:

Multiple ROI Example

The pixel information from within Region 11, Region 21, Region 12, and Region 22 is transmitted as a single image.

Configuring the Rows and Columns#

  1. Make sure the camera is idle, i.e., not capturing images.
  2. Make sure the Reverse X and Reverse Y feature is disabled.
    You can re-enable image mirroring after configuring the rows and columns.
  3. Configure the columns:
    1. If you want to define a single column:
      1. Set the BslMultipleROIColumnsEnable parameter to false.
      2. Set the OffsetX parameter to the desired horizontal offset of the column. This value is applied to all regions.
      3. Set the Width parameter to the desired width of the column. This value is applied to all regions.
    2. If you want to define multiple columns:
      1. Set the BslMultipleROIColumnsEnable parameter to true.
      2. Set the BslMultipleROIColumnSelector parameter to the desired column, e.g., Column0.
      3. Set the BslMultipleROIColumnOffset parameter to the desired horizontal offset of the column, e.g., 100.
      4. Set the BslMultipleROIColumnSize parameter to the desired width of the column, e.g., 50.
      5. Repeat the above steps for every column you want to configure.
        Note: To avoid undesired side effects, always configure the columns in ascending order, i.e., start with column 1, then configure column 2, and so on.
  4. Configure the rows:
    1. If you want to define a single row:
      1. Set the BslMultipleROIRowsEnable parameter to false.
      2. Set the OffsetY parameter to the desired vertical offset of the row. This value is applied to all regions.
      3. Set the Height parameter to the desired height of the row. This value is applied to all regions.
    2. If you want to define multiple rows:
      1. Set the BslMultipleROIRowsEnable parameter to true.
      2. Set the BslMultipleROIRowSelector parameter to the desired row, e.g., Row0.
      3. Set the BslMultipleROIRowOffset parameter to the desired vertical offset of the row, e.g., 100.
      4. Set the BslMultipleROIRowSize parameter to the desired height of the row, e.g., 50.
      5. Repeat the above steps for every row you want to configure.
        Note: To avoid undesired side effects, always configure the rows in ascending order, i.e., start with row 1, then configure row 2, and so on.
  5. If needed, re-enable Reverse X and Reverse Y.
    This automatically adapts the positions of the columns and rows to the mirrored image.

Considerations When Using the Multiple ROI Feature#

  • There's a sensor-specific minimum width and height for all regions combined, i.e., for the images created by the Multiple ROI feature. During configuration, the camera automatically adjusts the parameter values and ranges to meet the minimum width and height.
    Example: Assume the sensor of your camera specifies a minimum total width of 530 and lets you configure up to two columns. Now, if you set the width of column 1 to 200, the camera automatically sets the minimum width of column 2 to 330.
    Example 2: Assume you are using the same sensor as in the example above. Also assume the resolution of that sensor is 1920 x 1200. Now, if you'd set the vertical offset of column 0 to 900, there wouldn't be enough space to define a region that meets the minimum width requirement. Therefore, the camera automatically sets the maximum vertical offset for any column to 670 (1200 sensor width minus 530 minimum total region width).
  • Because of the above constraints, Basler strongly recommends configuring the columns and rows in ascending order, i.e., start with column 1, then configure column 2, and so on.
  • If the BslMultipleROIColumnsEnable parameter is set to true, the following parameters become read-only:

    • OffsetY: The parameter is set to the horizontal offset of column 1.
    • Width: The parameter is set to the total width of all regions, i.e., the width of the images created by the Multiple ROI feature.
  • If the BslMultipleROIRowsEnable parameter is set to true, the following parameters become read-only:

    • OffsetX: The parameter is set to the vertical offset of row 1.
    • Height: The parameter is set to the total height of all regions, i.e., the height of the images created by the Multiple ROI feature.
  • Other camera features that affect the image size, e.g., Binning or Pixel Beyond, are applied after the Multiple ROI feature. So when configuring the rows and columns, you don't have to take the effects of those features into account.

  • The auto function ROI positions and sizes automatically adapt to the output of the Multiple ROI feature. For example, if the width of all regions combined is 500, the maximum value of the AutoFunctionROIWidth parameter will be 500.

Specifics#

Show all camera models

Camera Model Maximum Number of Regions
a2A1920-51gcBAS 4
a2A1920-51gcPRO 4
a2A1920-51gmBAS 4
a2A1920-51gmPRO 4
a2A1920-160ucBAS 4
a2A1920-160ucPRO 4
a2A1920-160umBAS 4
a2A1920-160umPRO 4
a2A2590-22gcBAS Multiple ROI feature not supported
a2A2590-22gcPRO Multiple ROI feature not supported
a2A2590-22gmBAS Multiple ROI feature not supported
a2A2590-22gmPRO Multiple ROI feature not supported
a2A2590-60ucBAS Multiple ROI feature not supported
a2A2590-60ucPRO Multiple ROI feature not supported
a2A2590-60umBAS Multiple ROI feature not supported
a2A2590-60umPRO Multiple ROI feature not supported
a2A3840-13gcBAS Multiple ROI feature not supported
a2A3840-13gcPRO Multiple ROI feature not supported
a2A3840-13gmBAS Multiple ROI feature not supported
a2A3840-13gmPRO Multiple ROI feature not supported
a2A3840-45ucBAS Multiple ROI feature not supported
a2A3840-45ucPRO Multiple ROI feature not supported
a2A3840-45umBAS Multiple ROI feature not supported
a2A3840-45umPRO Multiple ROI feature not supported
a2A4504-5gcBAS 64
a2A4504-5gcPRO 64
a2A4504-5gmBAS 64
a2A4504-5gmPRO 64
a2A4504-18ucBAS 64
a2A4504-18ucPRO 64
a2A4504-18umBAS 64
a2A4504-18umPRO 64
a2A5320-7gcBAS 64
a2A5320-7gcPRO 64
a2A5320-7gmBAS 64
a2A5320-7gmPRO 64
a2A5320-23ucBAS 64
a2A5320-23ucPRO 64
a2A5320-23umBAS 64
a2A5320-23umPRO 64
a2A5328-4gcBAS 64
a2A5328-4gcPRO 64
a2A5328-4gmBAS 64
a2A5328-4gmPRO 64
a2A5328-15ucBAS 64
a2A5328-15ucPRO 64
a2A5328-15umBAS 64
a2A5328-15umPRO 64
acA640-90gc Multiple ROI feature not supported
acA640-90gm Multiple ROI feature not supported
acA640-90uc Multiple ROI feature not supported
acA640-90um Multiple ROI feature not supported
acA640-120gc Multiple ROI feature not supported
acA640-120gm Multiple ROI feature not supported
acA640-120uc Multiple ROI feature not supported
acA640-120um Multiple ROI feature not supported
acA640-121gm Multiple ROI feature not supported
acA640-300gc Multiple ROI feature not supported
acA640-300gm Multiple ROI feature not supported
acA640-750uc Multiple ROI feature not supported
acA640-750um Multiple ROI feature not supported
acA720-290gc Multiple ROI feature not supported
acA720-290gm Multiple ROI feature not supported
acA720-520uc Multiple ROI feature not supported
acA720-520um Multiple ROI feature not supported
acA780-75gc Multiple ROI feature not supported
acA780-75gm Multiple ROI feature not supported
acA800-200gc Multiple ROI feature not supported
acA800-200gm Multiple ROI feature not supported
acA800-510uc Multiple ROI feature not supported
acA800-510um Multiple ROI feature not supported
acA1280-60gc Multiple ROI feature not supported
acA1280-60gm Multiple ROI feature not supported
acA1300-22gc Multiple ROI feature not supported
acA1300-22gm Multiple ROI feature not supported
acA1300-30gc Multiple ROI feature not supported
acA1300-30gm Multiple ROI feature not supported
acA1300-30uc Multiple ROI feature not supported
acA1300-30um Multiple ROI feature not supported
acA1300-60gc Multiple ROI feature not supported
acA1300-60gm Multiple ROI feature not supported
acA1300-60gmNIR Multiple ROI feature not supported
acA1300-75gc Multiple ROI feature not supported
acA1300-75gm Multiple ROI feature not supported
acA1300-200uc Multiple ROI feature not supported
acA1300-200um Multiple ROI feature not supported
acA1440-73gc Multiple ROI feature not supported
acA1440-73gm Multiple ROI feature not supported
acA1440-220uc Multiple ROI feature not supported
acA1440-220um Multiple ROI feature not supported
acA1600-20gc Multiple ROI feature not supported
acA1600-20gm Multiple ROI feature not supported
acA1600-20uc Multiple ROI feature not supported
acA1600-20um Multiple ROI feature not supported
acA1600-60gc Multiple ROI feature not supported
acA1600-60gm Multiple ROI feature not supported
acA1920-25gc Multiple ROI feature not supported
acA1920-25gm Multiple ROI feature not supported
acA1920-25uc Multiple ROI feature not supported
acA1920-25um Multiple ROI feature not supported
acA1920-40gc Multiple ROI feature not supported
acA1920-40gm Multiple ROI feature not supported
acA1920-40uc Multiple ROI feature not supported
acA1920-40ucMED Multiple ROI feature not supported
acA1920-40um Multiple ROI feature not supported
acA1920-40umMED Multiple ROI feature not supported
acA1920-48gc Multiple ROI feature not supported
acA1920-48gm Multiple ROI feature not supported
acA1920-50gc Multiple ROI feature not supported
acA1920-50gm Multiple ROI feature not supported
acA1920-150uc Multiple ROI feature not supported
acA1920-150um Multiple ROI feature not supported
acA1920-155uc Multiple ROI feature not supported
acA1920-155ucMED Multiple ROI feature not supported
acA1920-155um Multiple ROI feature not supported
acA1920-155umMED Multiple ROI feature not supported
acA2000-50gc Multiple ROI feature not supported
acA2000-50gm Multiple ROI feature not supported
acA2000-50gmNIR Multiple ROI feature not supported
acA2000-165uc Multiple ROI feature not supported
acA2000-165um Multiple ROI feature not supported
acA2000-165umNIR Multiple ROI feature not supported
acA2040-25gc Multiple ROI feature not supported
acA2040-25gm Multiple ROI feature not supported
acA2040-25gmNIR Multiple ROI feature not supported
acA2040-35gc Multiple ROI feature not supported
acA2040-35gm Multiple ROI feature not supported
acA2040-55uc Multiple ROI feature not supported
acA2040-55um Multiple ROI feature not supported
acA2040-90uc Multiple ROI feature not supported
acA2040-90um Multiple ROI feature not supported
acA2040-90umNIR Multiple ROI feature not supported
acA2040-120uc Multiple ROI feature not supported
acA2040-120um Multiple ROI feature not supported
acA2440-20gc Multiple ROI feature not supported
acA2440-20gm Multiple ROI feature not supported
acA2440-35uc Multiple ROI feature not supported
acA2440-35ucMED Multiple ROI feature not supported
acA2440-35um Multiple ROI feature not supported
acA2440-35umMED Multiple ROI feature not supported
acA2440-75uc Multiple ROI feature not supported
acA2440-75ucMED Multiple ROI feature not supported
acA2440-75um Multiple ROI feature not supported
acA2440-75umMED Multiple ROI feature not supported
acA2500-14gc Multiple ROI feature not supported
acA2500-14gm Multiple ROI feature not supported
acA2500-14uc Multiple ROI feature not supported
acA2500-14um Multiple ROI feature not supported
acA2500-20gc Multiple ROI feature not supported
acA2500-20gcMED Multiple ROI feature not supported
acA2500-20gm Multiple ROI feature not supported
acA2500-20gmMED Multiple ROI feature not supported
acA2500-60uc Multiple ROI feature not supported
acA2500-60um Multiple ROI feature not supported
acA3088-16gc Multiple ROI feature not supported
acA3088-16gm Multiple ROI feature not supported
acA3088-57uc Multiple ROI feature not supported
acA3088-57ucMED Multiple ROI feature not supported
acA3088-57um Multiple ROI feature not supported
acA3088-57umMED Multiple ROI feature not supported
acA3800-10gc Multiple ROI feature not supported
acA3800-10gm Multiple ROI feature not supported
acA3800-14uc Multiple ROI feature not supported
acA3800-14um Multiple ROI feature not supported
acA4024-8gc Multiple ROI feature not supported
acA4024-8gm Multiple ROI feature not supported
acA4024-29uc Multiple ROI feature not supported
acA4024-29um Multiple ROI feature not supported
acA4096-11gc Multiple ROI feature not supported
acA4096-11gm Multiple ROI feature not supported
acA4096-30uc Multiple ROI feature not supported
acA4096-30ucMED Multiple ROI feature not supported
acA4096-30um Multiple ROI feature not supported
acA4096-30umMED Multiple ROI feature not supported
acA4096-40uc Multiple ROI feature not supported
acA4096-40ucMED Multiple ROI feature not supported
acA4096-40um Multiple ROI feature not supported
acA4096-40umMED Multiple ROI feature not supported
acA4112-8gc Multiple ROI feature not supported
acA4112-8gm Multiple ROI feature not supported
acA4112-20uc Multiple ROI feature not supported
acA4112-20ucMED Multiple ROI feature not supported
acA4112-20um Multiple ROI feature not supported
acA4112-20umMED Multiple ROI feature not supported
acA4112-30uc Multiple ROI feature not supported
acA4112-30ucMED Multiple ROI feature not supported
acA4112-30um Multiple ROI feature not supported
acA4112-30umMED Multiple ROI feature not supported
acA4600-7gc Multiple ROI feature not supported
acA4600-10uc Multiple ROI feature not supported
acA5472-5gc Multiple ROI feature not supported
acA5472-5gm Multiple ROI feature not supported
acA5472-17uc Multiple ROI feature not supported
acA5472-17ucMED Multiple ROI feature not supported
acA5472-17um Multiple ROI feature not supported
acA5472-17umMED Multiple ROI feature not supported
boA4096-93cc Multiple ROI feature not supported
boA4096-93cm Multiple ROI feature not supported
boA4112-68cc Multiple ROI feature not supported
boA4112-68cm Multiple ROI feature not supported
daA1280-54lc Multiple ROI feature not supported
daA1280-54lm Multiple ROI feature not supported
daA1280-54uc Multiple ROI feature not supported
daA1280-54um Multiple ROI feature not supported
daA1600-60lc Multiple ROI feature not supported
daA1600-60lm Multiple ROI feature not supported
daA1600-60uc Multiple ROI feature not supported
daA1600-60um Multiple ROI feature not supported
daA1920-15um Multiple ROI feature not supported
daA1920-30uc Multiple ROI feature not supported
daA1920-30um Multiple ROI feature not supported
daA1920-160uc Multiple ROI feature not supported
daA1920-160um Multiple ROI feature not supported
daA2500-14lc Multiple ROI feature not supported
daA2500-14lm Multiple ROI feature not supported
daA2500-14uc Multiple ROI feature not supported
daA2500-14um Multiple ROI feature not supported
daA2500-60mc Multiple ROI feature not supported
daA2500-60mci Multiple ROI feature not supported
daA4200-30mci Multiple ROI feature not supported
puA1280-54uc Multiple ROI feature not supported
puA1280-54um Multiple ROI feature not supported
puA1600-60uc Multiple ROI feature not supported
puA1600-60um Multiple ROI feature not supported
puA1920-30uc Multiple ROI feature not supported
puA1920-30um Multiple ROI feature not supported
puA2500-14uc Multiple ROI feature not supported
puA2500-14um Multiple ROI feature not supported

Sample Code#

// ** In this example, we define two regions in horizontal direction
// that will be transmitted as a single image. **
// Enable the ability to configure multiple columns
camera.BslMultipleROIColumnsEnable.SetValue(true);
// Select column 1
camera.BslMultipleROIColumnSelector.SetValue(BslMultipleROIColumnSelector_Column0);
// The first region should have a horizontal offset of 100 and a width of 300 pixels
camera.BslMultipleROIColumnOffset.SetValue(100);
camera.BslMultipleROIColumnSize.SetValue(300);
// Select column 2
camera.BslMultipleROIColumnSelector.SetValue(BslMultipleROIColumnSelector_Column1);
// The second region should have a horizontal offset of 500 and a width of 400 pixels
camera.BslMultipleROIColumnOffset.SetValue(500);
camera.BslMultipleROIColumnSize.SetValue(400);
// We only need one row, so disable the ability to configure multiple rows
camera.BslMultipleROIRowsEnable.SetValue(false);
// Both regions should have a vertical offset of 200 and a height of 500
camera.OffsetY.SetValue(200);
camera.Height.SetValue(500);
INodeMap& nodemap = camera.GetNodeMap();
// ** In this example, we define two regions in horizontal direction
// that will be transmitted as a single image. **
// Enable the ability to configure multiple columns
CBooleanPtr(nodemap.GetNode("BslMultipleROIColumnsEnable"))->SetValue(true);
// Select column 1
CEnumerationPtr(nodemap.GetNode("BslMultipleROIColumnSelector"))->FromString("Column0");
// The first region should have a horizontal offset of 100 and a width of 300 pixels
CIntegerPtr(nodemap.GetNode("BslMultipleROIColumnOffset"))->SetValue(100);
CIntegerPtr(nodemap.GetNode("BslMultipleROIColumnSize"))->SetValue(300);
// Select column 2
CEnumerationPtr(nodemap.GetNode("BslMultipleROIColumnSelector"))->FromString("Column1");
// The second region should have a horizontal offset of 500 and a width of 400 pixels
CIntegerPtr(nodemap.GetNode("BslMultipleROIColumnOffset"))->SetValue(500);
CIntegerPtr(nodemap.GetNode("BslMultipleROIColumnSize"))->SetValue(400);
// We only need one row, so disable the ability to configure multiple rows
CBooleanPtr(nodemap.GetNode("BslMultipleROIRowsEnable"))->SetValue(false);
// Both regions should have a vertical offset of 200 and a height of 500
CIntegerPtr(nodemap.GetNode("OffsetY"))->SetValue(200);
CIntegerPtr(nodemap.GetNode("Height"))->SetValue(500);
INodeMap& nodemap = camera.GetNodeMap();
// ** In this example, we define two regions in horizontal direction
// that will be transmitted as a single image. **
// Enable the ability to configure multiple columns
CBooleanParameter(nodemap, "BslMultipleROIColumnsEnable").SetValue(true);
// Select column 1
CEnumParameter(nodemap, "BslMultipleROIColumnSelector").SetValue("Column0");
// The first region should have a horizontal offset of 100 and a width of 300 pixels
CIntegerParameter(nodemap, "BslMultipleROIColumnOffset").SetValue(100);
CIntegerParameter(nodemap, "BslMultipleROIColumnSize").SetValue(300);
// Select column 2
CEnumParameter(nodemap, "BslMultipleROIColumnSelector").SetValue("Column1");
// The second region should have a horizontal offset of 500 and a width of 400 pixels
CIntegerParameter(nodemap, "BslMultipleROIColumnOffset").SetValue(500);
CIntegerParameter(nodemap, "BslMultipleROIColumnSize").SetValue(400);
// We only need one row, so disable the ability to configure multiple rows
CBooleanParameter(nodemap, "BslMultipleROIRowsEnable").SetValue(false);
// Both regions should have a vertical offset of 200 and a height of 500
CIntegerParameter(nodemap, "OffsetY").SetValue(200);
CIntegerParameter(nodemap, "Height").SetValue(500);
// ** In this example, we define two regions in horizontal direction
// that will be transmitted as a single image. **
// Enable the ability to configure multiple columns
camera.Parameters[PLCamera.BslMultipleROIColumnsEnable].SetValue(true);
// Select column 1
camera.Parameters[PLCamera.BslMultipleROIColumnSelector].SetValue(PLCamera.BslMultipleROIColumnSelector.Column0);
// The first region should have a horizontal offset of 100 and a width of 300 pixels
camera.Parameters[PLCamera.BslMultipleROIColumnOffset].SetValue(100);
camera.Parameters[PLCamera.BslMultipleROIColumnSize].SetValue(300);
// Select column 2
camera.Parameters[PLCamera.BslMultipleROIColumnSelector].SetValue(PLCamera.BslMultipleROIColumnSelector.Column1);
// The second region should have a horizontal offset of 500 and a width of 400 pixels
camera.Parameters[PLCamera.BslMultipleROIColumnOffset].SetValue(500);
camera.Parameters[PLCamera.BslMultipleROIColumnSize].SetValue(400);
// We only need one row, so disable the ability to configure multiple rows
camera.Parameters[PLCamera.BslMultipleROIRowsEnable].SetValue(false);
// Both regions should have a vertical offset of 200 and a height of 500
camera.Parameters[PLCamera.OffsetY].SetValue(200);
camera.Parameters[PLCamera.Height].SetValue(500);
// ** In this example, we define two regions in horizontal direction
// that will be transmitted as a single image. **
// Enable the ability to configure multiple columns
Pylon.DeviceSetBooleanFeature(hdev, "BslMultipleROIColumnsEnable", true);
// Select column 1
Pylon.DeviceFeatureFromString(hdev, "BslMultipleROIColumnSelector", "Column0");
// The first region should have a horizontal offset of 100 and a width of 300 pixels
Pylon.DeviceSetIntegerFeature(hdev, "BslMultipleROIColumnOffset", 100);
Pylon.DeviceSetIntegerFeature(hdev, "BslMultipleROIColumnSize", 300);
// Select column 2
Pylon.DeviceFeatureFromString(hdev, "BslMultipleROIColumnSelector", "Column1");
// The second region should have a horizontal offset of 500 and a width of 400 pixels
Pylon.DeviceSetIntegerFeature(hdev, "BslMultipleROIColumnOffset", 500);
Pylon.DeviceSetIntegerFeature(hdev, "BslMultipleROIColumnSize", 400);
// We only need one row, so disable the ability to configure multiple rows
Pylon.DeviceSetBooleanFeature(hdev, "BslMultipleROIRowsEnable", false);
// Both regions should have a vertical offset of 200 and a height of 500
Pylon.DeviceSetIntegerFeature(hdev, "OffsetY", 200);
Pylon.DeviceSetIntegerFeature(hdev, "Height", 500);
/* 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 */
/* ** In this example, we define two regions in horizontal direction */
/* that will be transmitted as a single image. ** */
/* Enable the ability to configure multiple columns */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslMultipleROIColumnsEnable", 1);
CHECK(errRes);
/* Select column 1 */
errRes = PylonDeviceFeatureFromString(hdev, "BslMultipleROIColumnSelector", "Column0");
CHECK(errRes);
/* The first region should have a horizontal offset of 100 and a width of 300 pixels */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslMultipleROIColumnOffset", 100);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "BslMultipleROIColumnSize", 300);
CHECK(errRes);
/* Select column 2 */
errRes = PylonDeviceFeatureFromString(hdev, "BslMultipleROIColumnSelector", "Column1");
CHECK(errRes);
/* The second region should have a horizontal offset of 500 and a width of 400 pixels */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslMultipleROIColumnOffset", 500);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "BslMultipleROIColumnSize", 400);
CHECK(errRes);
/* We only need one row, so disable the ability to configure multiple rows */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslMultipleROIRowsEnable", 0);
CHECK(errRes);
/* Both regions should have a vertical offset of 200 and a height of 500 */
errRes = PylonDeviceSetIntegerFeature(hdev, "OffsetY", 200);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "Height", 500);
CHECK(errRes);

You can also use the pylon Viewer to easily set the parameters.