write_texture_inspection_model🔗
説明🔗
write_texture_inspection_model — テクスチャ検査モデルをファイルに書き込む。
書式🔗
write_texture_inspection_model( texture_inspection_model TextureInspectionModel, filename.write FileName )
説明🔗
write_texture_inspection_model は、テクスチャ検査モデル
TextureInspectionModel を FileName で指定された
ファイルに書き込みます。
テクスチャ検査モデルの HALCON ファイルのデフォルトの拡張子は '
htim' です。通常 write_texture_inspection_model は、テク
スチャ検査モデルが train_texture_inspection_model でトレー
ニングされた後に呼び出されます。ただし、これを使用して、トレーニン
グされていないモデルを保存することもできます。
テクスチャ検査モデルは read_texture_inspection_model で読
み込むことができます。
注目すべきは、write_texture_inspection_model は、テクスチ
ャ検査モデルに保存されている可能性があるトレーニングサンプルを
書き込まないということです。代わりに、モデルに現在設定さ
れているパラメーター、追加されている画像(必要な場合)、および 1
つのピラミッドレベルの識別子(トレーニングされている場合)のみが書
き込まれます。
テクスチャ検査の概念については、「Inspection / Texture」の 章のイントロダクションを参照してください。
実行情報🔗
実行情報
-
マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)
-
マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)
-
並列演算処理には未対応
パラメーター🔗
TextureInspectionModel (input_control) texture_inspection_model → (handle)
テクスチャ検査モデルのハンドル
FileName (input_control) filename.write → (string)
ファイル名
ファイル拡張子: .htim
例🔗
(HDevelop)
* Create texture inspection model
create_texture_inspection_model ('basic', TextureInspectionModel)
* Make this short example fast:
set_texture_inspection_model_param (TextureInspectionModel, \
'gmm_em_max_iter', 1)
* Read and add training images
read_image (TrainImage, 'carpet/carpet_01')
add_texture_inspection_model_image (TrainImage, TextureInspectionModel, \
Indices)
* Train the model
train_texture_inspection_model (TextureInspectionModel)
* Write out texture inspection model
write_texture_inspection_model (TextureInspectionModel, 'ExampleModel.htim')
結果🔗
パラメーターが有効ならば、オペレーター
write_texture_inspection_model は値 2 (H_MSG_TRUE) を返します。必要
に応じて、例外が発生します。
他のオペレーターとの組み合わせ🔗
組み合わせ
前処理の候補
train_texture_inspection_model
後処理の候補
clear_texture_inspection_model
関連項目
create_texture_inspection_model, clear_texture_inspection_model, set_texture_inspection_model_param, get_texture_inspection_model_param, add_texture_inspection_model_image
モジュール🔗
Matching