clear_texture_inspection_model — 清除纹理检查模型并释放分配的内存。
clear_texture_inspection_model( : : TextureInspectionModel : )
算子 clear_texture_inspection_model 删除由 create_texture_inspection_model 创建的纹理检查模型。该模型占用的所有内存将被释放。模型句柄通过 TextureInspectionModel 参数传递。在调用算子后,该句柄将失效。
有关纹理检查概念的说明,请参阅 检查 / 纹理检查 一章的引言。
此算子修改后续输入参数的状态:
在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。
TextureInspectionModel (输入控制,状态被修改) texture_inspection_model(-array) → (handle)
纹理检查模型的句柄。
* Create texture inspection model
create_texture_inspection_model ('basic', TextureInspectionModel)
* 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)
* Read and apply a test image
read_image (TestImage, 'carpet/carpet_02')
apply_texture_inspection_model (TestImage, DefectCandidates, \
TextureInspectionModel, \
TextureInspectionResultID)
算子 clear_texture_inspection_model 返回值 2 (H_MSG_TRUE),当传递了有效的句柄且所引用的纹理检查模型可被正确释放。否则,将抛出异常。
create_texture_inspection_model
匹配