| Operatoren |
write_texture_inspection_model — Abspeichern eines Texturinspektionsmodells in einer Datei.
write_texture_inspection_model( : : TextureInspectionModel, FileName : )
write_texture_inspection_model speichert das Texturinspektionsmodell TextureInspectionModel in der Datei FileName ab. Die Dateiendung für das Texturinspektionsmodell ist in HALCON 'htim'. write_texture_inspection_model wird typischerweise aufgerufen, nachdem das Texturinspektionsmodell mit train_texture_inspection_model trainiert wurde, kann jedoch auch zum Speichern eines untrainierten Modells verwendet werden. Das Texturinspektionsmodell kann mit read_texture_inspection_model wieder eingelesen werden. write_texture_inspection_model schreibt die im Modell gesetzten Parameter sowie eventuell hinzugefügte Bilder und bei einem trainierten Modell die Ergebnisse des Trainings.
Das Konzept der Texturinspektion ist bei der Einleitung zum Kapitel Inspektion / Texturinspektion beschrieben.
Handle des Texturinspektionsmodells.
* 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')
* Clean up
clear_texture_inspection_model (TextureInspectionModel)
Sind die Parameterwerte korrekt, dann liefert write_texture_inspection_model den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
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
| Operatoren |