Skip to content

create_image_sourceCreateImageSourceCreateImageSourcecreate_image_sourceT_create_image_source🔗

説明🔗

create_image_sourceCreateImageSourceCreateImageSourcecreate_image_sourceT_create_image_source — 画像ソースハンドルを作成する。

書式🔗

create_image_source( string PluginName, string DeviceID, attribute.name GenParamName, attribute.value GenParamValue, out image_source ImageSourceHandle )void CreateImageSource( const HTuple& PluginName, const HTuple& DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ImageSourceHandle )static void HOperatorSet.CreateImageSource( HTuple pluginName, HTuple deviceID, HTuple genParamName, HTuple genParamValue, out HTuple imageSourceHandle )def create_image_source( plugin_name: str, device_id: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]] ) -> HHandle

Herror T_create_image_source( const Htuple PluginName, const Htuple DeviceID, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ImageSourceHandle )

void HImageSource::HImageSource( const HString& PluginName, const HString& DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue )

void HImageSource::HImageSource( const char* PluginName, const char* DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue )

void HImageSource::HImageSource( const wchar_t* PluginName, const wchar_t* DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

public HImageSource( string pluginName, string deviceID, HTuple genParamName, HTuple genParamValue )

void HImageSource::CreateImageSource( const HString& PluginName, const HString& DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue )

void HImageSource::CreateImageSource( const char* PluginName, const char* DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue )

void HImageSource::CreateImageSource( const wchar_t* PluginName, const wchar_t* DeviceID, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

void HImageSource.CreateImageSource( string pluginName, string deviceID, HTuple genParamName, HTuple genParamValue )

説明🔗

create_image_sourceCreateImageSource は画像ソースハンドルを作成し、 それを ImageSourceHandleimageSourceHandleimage_source_handle に返します。 作成されたハンドルは未接続の状態です。 パラメータ PluginNamepluginNameplugin_name および DeviceIDdeviceIDdevice_id により、 画像ソースハンドルに対応するプラグインおよびデバイスモジュールを指定できます。 代わりに、汎用パラメータ GenParamNamegenParamNamegen_param_name と GenParamValuegenParamValuegen_param_value を使用して、 プラグイン名やデバイスID以外の識別子による指定も可能です。

画像ソースハンドルは、画像ソース設定ファイルを読み込むことで、 モジュールをあらかじめ指定した状態で作成することができます。 画像ソースハンドル内のその他のパラメータも、このファイルで設定された値に設定されます。 画像ソース設定ファイルには、connect_image_sourceConnectImageSource の呼び出し時に適用される 画像ソースモジュール(デバイス、プラグインなど)の持続化可能なパラメータの値も保存できます。 このような設定ファイルを書き出す方法(後で使用するため)については、control_image_sourceControlImageSource を参照してください。

画像ソースの概念に関する詳細は、Image Source を参照してください。 個々のMVTec画像ソースプラグインに関しては MVTec Interfaces Reference Documentationを参照してください。

PluginNamepluginNameplugin_name に対しては、以下のオプションが使用できます:

DeviceIDdeviceIDdevice_id に対しては、以下のオプションが使用できます:

ImageSourceHandleimageSourceHandleimage_source_handle のモジュールは、 以下のいずれかを GenParamNamegenParamNamegen_param_name に指定することで設定できます:

使用可能なすべての画像ソースに対する値は query_image_sourcesQueryImageSources で取得できます。

PluginNamepluginNameplugin_name と DeviceIDdeviceIDdevice_id の両方に 'none'"none" を設定し、 汎用パラメータを指定しないことで、空の画像ソースハンドルを作成することができます。 空の画像ソースハンドルは、set_image_source_paramSetImageSourceParam を使用して後から拡張できます。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

このオペレータはハンドルを返します。このハンドルタイプのインスタンスの状態は、特定のオペレータにおいては、入力パラメータとして使われている場合であっても変更されることがあります。

パラメーター🔗

PluginNamepluginNameplugin_name (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

画像ソースプラグインの名前

初期値: 'none'"none"
推奨値: 'none', 'ignore', 'mvtec_gigevision', 'mvtec_usb3vision', 'mvtec_realsense', 'mvtec_gstreamer', 'mvtec_mediafoundation', '<plugin_name>'"none", "ignore", "mvtec_gigevision", "mvtec_usb3vision", "mvtec_realsense", "mvtec_gstreamer", "mvtec_mediafoundation", "<plugin_name>"

DeviceIDdeviceIDdevice_id (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

画像ソースデバイスのID

初期値: 'none'"none"
推奨値: 'none', 'ignore'"none", "ignore"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

汎用パラメータ名

初期値: [][]
推奨値: 'plugin_path', 'interface_id', 'device_user_name', 'device_serial_number', 'stream_id', 'read_config_file'"plugin_path", "interface_id", "device_user_name", "device_serial_number", "stream_id", "read_config_file"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[int, float, str]]Htuple (Hlong / double / char*)

汎用パラメータ値

初期値: [][]

ImageSourceHandleimageSourceHandleimage_source_handle (output_control) image_source → (handle)HTuple (HHandle)HImageSource, HTuple (IntPtr)HHandleHtuple (handle)

モジュール識別子を格納した画像ソースハンドル

例🔗

(HDevelop)


* Specify the plugin for GigE Vision devices via its name.
create_image_source ('mvtec_gigevision', 'none', [], [], ImageSourceHandle)
* Specify a plugin by providing its path.
create_image_source ('ignore', 'none', 'plugin_path', 'path/to/plugin.cti', ImageSourceHandle)
*
* Specify a GigE Vision device by providing its unique ID.
create_image_source ('mvtec_gigevision', '00305324c805_Basler_acA244020gc', [], [], ImageSourceHandle)
* Specify a GigE Vision camera by providing its user name.
create_image_source ('mvtec_gigevision', 'ignore', 'device_user_name', 'MyDevice', ImageSourceHandle)

結果🔗

パラメータ値が正しければ、create_image_sourceCreateImageSource は 2 (H_MSG_TRUE) を返します。 さもなければ、例外処理が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

後処理の候補

connect_image_sourceConnectImageSource, get_image_source_paramGetImageSourceParam, set_image_source_paramSetImageSourceParam

他の選択候補

query_image_sourcesQueryImageSources

関連項目

query_image_sourcesQueryImageSources

モジュール🔗

Foundation