Triggered Image Acquisition (BCON for MIPI)#
最新の画像処理アプリケーションの多くは、トリガーされた画像取得に対応しています。
機能を使用する#
ハードウェアとソフトウェアのトリガー#
When the camera is configured for hardware triggering, an electrical signal applied to one of the camera's input lines can act as a trigger signal.
カメラがソフトウェアトリガー用に設定されている場合、ソフトウェアコマンドまたは信号はトリガー信号として機能します。ソフトウェアコマンドは、pylon API を使用して実行できます。
設定の観点からは、ハードウェアトリガーとソフトウェアトリガーの唯一の違いは Trigger Source です。ハードウェアトリガーの場合、ハードウェア Trigger Sourceを選択する必要があります。ソフトウェアトリガーの場合、ソフトウェア Trigger Source を選択する必要があります。
また、一部の設定手順(トリガー起動モードの選択など)は、ソフトウェアトリガーには適用されません。
トリガー画像取得の設定#
トリガー画像取得を設定するには、以下のようにします。
- Set the
TriggerMode
parameter toOn
to enable triggered image acquisition. - トリガーを次のように設定します。
TriggerSource
パラメーターを設定して、どの信号がトリガーをトリガーするかを定義します。- 該当する場合は、
TriggerActivation
パラメーターを設定して、どの信号遷移がトリガーをトリガーするかを定義します。
情報
-
次の制限要因のいずれか、または両方を超えるレートでカメラをトリガーしないでください。
- The maximum allowed frame rate for the current camera settings. If you apply Frame Start trigger signals to the camera when it is not ready to receive them, the signals will be ignored.
- The host computer's capacity limits for data transfer, storage, or both. If you try to acquire more images than the host computer is able to process, frames may be dropped.
Trigger Source#
TriggerSource
パラメーターを使用して Trigger Source を設定できます。
This defines how a trigger is triggered.
The following trigger sources are available:
ハードウェア Trigger Source#
Line1
:選択したトリガーは、I/Oライン1に電気信号を印加することでトリガーされます。PeriodicSignal1
:選択したトリガーは、Periodic Signal機能を使用してトリガーされます。
ソフトウェア Trigger Source#
Software
:選択したトリガーは、pylon API を介してTriggerSoftware
コマンドを実行することでトリガーできます。
Trigger Activationモード#
TriggerActivation
パラメーターを使用して起動モードを設定できます。
This setting only applies to hardware triggering. It defines which signal transition activates the selected trigger. For example, you can specify that a trigger becomes active when the trigger signal falls.
The following trigger activation modes are available:
LevelHigh
:トリガー信号が高である限り、トリガーはアクティブです。LevelLow
:トリガー信号が低である限り、トリガーはアクティブです。
サンプルコード#
// Enable triggered image acquisition for the Frame Start trigger
camera.TriggerMode.SetValue(TriggerMode_On);
// Set the trigger source to Line 1
camera.TriggerSource.SetValue(TriggerSource_Line1);
// Set the trigger activation mode to level high
camera.TriggerActivation.SetValue(TriggerActivation_LevelHigh);
INodeMap& nodemap = camera.GetNodeMap();
// Enable triggered image acquisition for the Frame Start trigger
CEnumParameter(nodemap, "TriggerMode").SetValue("On");
// Set the trigger source to Line 1
CEnumParameter(nodemap, "TriggerSource").SetValue("Line1");
// Set the trigger activation mode to level high
CEnumParameter(nodemap, "TriggerActivation").SetValue("LevelHigh");
/* 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 triggered image acquisition for the Frame Start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerMode", "On");
CHECK(errRes);
/* Set the trigger source to Line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSource", "Line1");
CHECK(errRes);
/* Set the trigger activation mode to level high */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerActivation", "LevelHigh");
CHECK(errRes);
pylonViewerアを使用して、パラメーターを簡単に設定することもできます。