pylonを使用したフレームグラバーの設定#
情報
This topic covers basic use cases. For in-depth information about the software features of the frame grabber, see the following documentation:
Configuring the frame grabber is especially useful in the following situations:
- You want to change the applet used by the frame grabber.
- You want to trigger the connected Basler boost camera via the frame grabber.
- You want to perform debayering on the frame grabber to increase the performance of your imaging system.
- You want to use an output format that isn't available on your camera, e.g., a 16-bit mono format.
- You want to configure the trigger signals received or sent by the frame grabber.
アプレットの変更#
The applet running on the frame grabber defines its functionality. For certain camera setups, you may have to change the default applet.
To change the applet used by the frame grabber, set the InterfaceApplet parameter to the name of the applet to be loaded, e.g., Acq_DualCXP12Area.
To find out which applets are available, see Acquisition Applets for imaWorx CXP-12 Quad.
Using the Frame Grabber to Trigger a Basler boost Camera#
情報
This section is only relevant if you specifically want to trigger the camera via the frame grabber. Usually, the camera is triggered via the camera's I/O connector. For more information, see Triggered Image Acquisition.
ハードウェアトリガー(外部)#
With external triggering enabled, you can send trigger input signals to the frame grabber, and the frame grabber forwards these signals to the Basler boost camera.
To configure the frame grabber for external hardware triggering:
- パラメーターを
AreaTriggerModeparameter toExternal. - パラメーターを
TriggerInSourceparameter to the desired "Front GPI" input line.
For example, if you want to use GPI0 (pin 11 and 12 on the frame grabber) for external triggering, set the parameter toFrontGpiTriggerSource0. - パラメーターを
TriggerCameraOutSelectparameter to the corresponding "Bypass" option.
For example, if you selectedFrontGpiTriggerSource0, set theTriggerCameraOutSelectparameter toBypassFrontGpi0. - パラメーターを
TriggerStateparameter toActive. - 必要に応じて、以下の説明に従ってトリガー信号を設定します。
All trigger signals are forwarded to the camera's source signals CxpTrigger0 and CxpTrigger1 (there is currently no difference in behavior between the two lines). The signals can be used for various purposes. The most common use case is image acquisition. See the example below.
ハードウェアトリガー(内部)#
With internal triggering enabled, the frame grabber generates trigger signals internally at a specified frequency. All external trigger signals are ignored.
To configure the frame grabber for internal hardware triggering:
- パラメーターを
AreaTriggerModeparameter toGenerator. - パラメーターを
TriggerOutputFrequencyparameter to the desired trigger output frequency. For example, if you set the parameter to 8, the frame grabber will generate 8 trigger signals per second. - パラメーターを
TriggerCameraOutSelectparameter to the desired output line, e.g.,PulseGenerator0. - パラメーターを
TriggerStateparameter toActive.
Now, whenever you start image acquisition, the frame grabber will generate trigger signals at the specified frequency.
All trigger signals are forwarded to the camera's source signals CxpTrigger0 and CxpTrigger1. The signals can be used for various purposes. The most common use case is image acquisition. See the example below.
例:画像取得のトリガー信号の使用#
To use the external or internal trigger signals generated by the frame grabber to acquire images:
- On the camera, set the
TriggerSelectorparameter toFrameStart. - パラメーターを
TriggerModeparameter toOn. - パラメーターを
ExposureModeparameter toTimed. - パラメーターを
TriggerSourceparameter toCxpTrigger0またはCxpTrigger1.
As there is currently no difference in behavior between the two lines, you can choose either one of them.
Now, the camera acquires an image each time the frame grabber receives or generates a trigger signal.
情報
You can use the trigger signals as the source for any Basler boost camera feature that can be controlled by a signal source. For example, setting the CounterTriggerSource parameter to CxpTrigger0 allows you to control the Counter feature using the frame grabber.
Performing Debayering on the Frame Grabber#
You can perform debayering on the frame grabber. This reduces computing load on the camera and the host computer.
これを行うには:
- On the camera, set the
PixelFormatparameter to a Bayer pixel format, e.g.,BayerRG12. - On the frame grabber, set the
AutomaticFormatControlparameter tofalse.
This allows you to set the output format independently of the pixel format used by the camera. - On the frame grabber, set the
Formatparameter to the corresponding RGB pixel format.
The bit depth must be three times the bit depth of the Bayer pixel format. For example, BayerRG12 (camera) = Color36bit (frame grabber).
Now, the frame grabber will perform debayering on the camera's raw image data and output RGB image data.
情報
Make sure that you set the correct RGB pixel format in step 3 above. Otherwise, images won't be acquired properly.
カメラでは使用できない出力形式の使用#
Basler boostカメラは、いくつかのピクセルフォーマットで画像データを出力できます(Bayer RG 8やRBG 8など)。詳細については、ピクセルフォーマットのトピックを参照してください。
If your required pixel format isn't available on the camera and you also want to avoid image conversion on the host computer, you may be able to use one of the pixel formats provided by the frame grabber.
The frame grabber provides the following formats:
| Gray8bit | Gray10bit | Gray12bit | Gray16bit |
| Color24bit | Color30bit | Color36bit | Color48bit |
| Bayergr8 | Bayergr10 | Bayergr12 | Bayergr16 |
| Bayerrg8 | Bayerrg10 | Bayerrg12 | Bayerrg16 |
| Bayergb8 | Bayergb10 | Bayergb12 | Bayergb16 |
| Bayerbg8 | Bayerbg10 | Bayerbg12 | Bayerbg16 |
カメラで使用できない出力形式を使用するには:
- On the camera, set the
PixelFormatparameter to the desired camera pixel format, e.g.,Mono12. - On the frame grabber, set the
AutomaticFormatControlparameter tofalse.
This allows you to set the output format independently of the pixel format used by the camera. - On the frame grabber, set the
Formatparameter to the desired output format, e.g.,Gray16bit.
With the example values above, the frame grabber outputs 16-bit image data based on 12-bit camera image data. Padding bits (zeros) are inserted as illustrated below.
Configuring the Trigger Signals using the gpioTool#
With the gpioTool command-line tool, you can configure the physical properties of the trigger signals received or sent by the frame grabber:
The gpioTool is included in the Framegrabber SDK and in the pylon Software Suite.
For more information, see gpioTool.
サンプルコード#
// Select the Acq_SingleCXP12Area applet
camera.GetTLParams().InterfaceApplet.SetValue(Acq_SingleCXP12Area);
// Configure the frame grabber for external triggering
camera.GetTLParams().AreaTriggerMode.SetValue(AreaTriggerMode_External);
camera.GetTLParams().TriggerInSource.SetValue(TriggerInSource_FrontGpiTriggerSource0);
camera.GetTLParams().TriggerCameraOutSelect.SetValue(TriggerCameraOutSelect_BypassFrontGpi0);
camera.GetTLParams().TriggerState.SetValue(TriggerState_Active);
// Configure the frame grabber for internal triggering
camera.GetTLParams().AreaTriggerMode.SetValue(AreaTriggerMode_Generator);
camera.GetTLParams().TriggerOutputFrequency.SetValue(8);
camera.GetTLParams().TriggerCameraOutSelect.SetValue(TriggerCameraOutSelect_PulseGenerator0);
camera.GetTLParams().TriggerState.SetValue(TriggerState_Active);
// Use the external or internal trigger signals for image acquisition
camera.TriggerSelector.SetValue(TriggerSelector_FrameStart);
camera.TriggerMode.SetValue(TriggerMode_On);
camera.ExposureMode.SetValue(ExposureMode_Timed);
camera.TriggerSource.SetValue(TriggerSource_CxpTrigger0);
// Perform debayering on the frame grabber (Bayer RG 12 --> RGB 36 bit)
camera.PixelFormat.SetValue(PixelFormat_BayerRG12);
camera.GetTLParams().AutomaticFormatControl.SetValue(false);
camera.GetTLParams().Format.SetValue(Format_Color36bit);
// Configure the frame grabber to output 16-bit mono image data based on
// 12-bit mono image data from the camera
camera.PixelFormat.SetValue(PixelFormat_Mono12);
camera.GetTLParams().AutomaticFormatControl.SetValue(false);
camera.GetTLParams().Format.SetValue(Format_Gray16bit);
このサンプルコードは、C++言語でのみ使用できます。
You can also use the pylon Viewer to set the parameters.