コンテンツにスキップ

Stacked Zone Imaging#

Stacked Zone Imagingカメラ機能を使用すると、センサーアレイ上で最大8つのゾーンを定義して、単一の画像として送信できます。

これらのゾーンからの画素データのみが送信されます。これにより、カメラのフレームレートが上がります。

機能を使用する#

仕組み#

Stacked Zone Imaging機能を使用すると、センサーアレイ上で、幅が同じ最大8つの垂直に整列されたゾーンを定義できます。画像を取得すると、定義されたゾーン内の画素情報のみがセンサーから読み取られます。画素情報はスタックされ、1つの画像として送信されます。

Stacked Zone Imagingの例

ゾーンの幅は常に同じで、垂直方向に整列されます。ROIゾーンを設定するには、Baslerは、次の手順をお勧めします。

  1. すべてのゾーンに有効な幅と水平オフセットを定義します。
  2. 個々のゾーンの高さと垂直オフセットを定義します。

Stacked Zone Imagingの設定#

  1. Center X and Center YおよびDecimationの機能を無効にします(装備されている場合)。
  2. Set the StackedZoneImagingEnable parameter to true.
    The Stacked Zone Imaging feature is enabled and can be configured.
  3. Set the OffsetX parameter to the desired horizontal offset. The value is applied to all zones.
  4. Set the Width parameter to the desired zone width. The value is applied to all zones.
  5. Set the StackedZoneImagingIndex parameter to the zone that you want to configure, e.g., 1.
  6. Set the StackedZoneImagingZoneEnable parameter to true to enable the zone selected in step 4.
  7. Set the StackedZoneImagingZoneOffsetY parameter to the desired vertical offset. The value is applied to the zone selected in step 4.
  8. Set the StackedZoneImagingZoneHeight parameter to the desired zone height.
    The value is applied to the zone selected in step 4.
  9. 設定するゾーンごとに、手順4~7を繰り返します。

Stacked Zone Imaging使用時に考慮すること#

  • ゾーンは任意の順序で有効にできます。例えば、ゾーン2、4、6を有効にし、ゾーン1、3、5を無効にできます。
  • センサーの周囲にゾーンを自由に配置できます。例えば、ゾーン1を下部あたりに、ゾーン3を上部あたりに、ゾーン2を中央に配置できます。ただし、カメラは常にセンサーの一番上のゾーンから画素データの読み取りと送信を開始し、下部に向かって進みます。
  • 垂直にオーバーラップするゾーンを定義できます。2つのゾーンがオーバーラップしている場合、それらは単一のマージされたゾーンとして送信されます。オーバーラップ領域からの画素データは、1回だけ読み取られて送信されます。
  • You can set the StackedZoneImagingZoneOffsetY and StackedZoneImagingZoneHeight parameters in increments of one on mono cameras, and in increments of two on color cameras. For color cameras, the parameter values must be even.
  • Stacked Zone Imaging機能を有効にすると、次のパラメーターが読み取り専用になります。
    • 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
  • Stacked Zone Imaging機能を有効にしてからビニングを有効にすると、スタックゾーンの位置とサイズが自動的に調整されます。パラメーター値は、対応するビニング係数で除算され、切り捨てられます。
  • Stacked Zones Imaging機能を使用した後にすべてのゾーンを無効にすると、画像ROIのサイズと位置は、最後に無効にしたゾーンのサイズと位置に設定されます。例えば、ゾーン0、1、および2が有効であるとします。次に、ゾーンを2、1、0の順に無効にします。その結果、画像ROIのサイズと位置は、無効にしたゾーン0のサイズと位置に設定されます。

サンプルコード#

// 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
CBooleanParameter(nodemap, "StackedZoneImagingEnable").SetValue(true);
// Configure width and offset X for all zones
CIntegerParameter(nodemap, "Width").SetValue(200);
CIntegerParameter(nodemap, "OffsetX").SetValue(100);
// Select zone 1
CIntegerParameter(nodemap, "StackedZoneImagingIndex").SetValue(1);
// Enable the selected zone
CBooleanParameter(nodemap, "StackedZoneImagingZoneEnable").SetValue(true);
// Set the vertical offset for the selected zone
CIntegerParameter(nodemap, "StackedZoneImagingZoneOffsetY").SetValue(100);
// Set the height for the selected zone
CIntegerParameter(nodemap, "StackedZoneImagingZoneHeight").SetValue(100);
// Select zone 2
CIntegerParameter(nodemap, "StackedZoneImagingIndex").SetValue(2);
// Enable the selected zone
CBooleanParameter(nodemap, "StackedZoneImagingZoneEnable").SetValue(true);
// Set the offset Y for the selected zone
CIntegerParameter(nodemap, "StackedZoneImagingZoneOffsetY").SetValue(250);
// Set the height for the selected zone
CIntegerParameter(nodemap, "StackedZoneImagingZoneHeight").SetValue(200);
// Enable stacked zone imaging
camera.Parameters[PLCamera.StackedZoneImagingEnable].SetValue(true);
// Configure 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 vertical offset 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);
/* 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);
/* Configure 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 vertical offset 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);
# Enable stacked zone imaging
camera.StackedZoneImagingEnable.Value = True
# Configure width and offset X for all zones
camera.Width.Value = 200
camera.OffsetX.Value = 100
# Select zone 1
camera.StackedZoneImagingIndex.Value = 1
# Enable the selected zone
camera.StackedZoneImagingZoneEnable.Value = True
# Set the vertical offset for the selected zone
camera.StackedZoneImagingZoneOffsetY.Value = 100
# Set the height for the selected zone
camera.StackedZoneImagingZoneHeight.Value = 100
# Select zone 2
camera.StackedZoneImagingIndex.Value = 2
# Enable the selected zone
camera.StackedZoneImagingZoneEnable.Value = True
# Set the offset Y for the selected zone
camera.StackedZoneImagingZoneOffsetY.Value = 250
# Set the height for the selected zone
camera.StackedZoneImagingZoneHeight.Value = 200

pylon Viewerを使用して、パラメーターを簡単に設定することもできます。