clear_texture_inspection_result — 清除纹理检查结果句柄并释放分配的内存。
clear_texture_inspection_result( : : TextureInspectionResultID : )
算子 clear_texture_inspection_result clears the texture
inspection result TextureInspectionResultID that was created by
apply_texture_inspection_model。All memory used by the model is freed.
The handle of the model is invalid after the operator call.
有关纹理检查概念的说明,请参阅 检查 / 纹理检查 一章的引言。
此算子修改后续输入参数的状态:
在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。
TextureInspectionResultID (输入控制,状态被修改) texture_inspection_result(-array) → (handle)
Handle of the texture inspection results.
* 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)
* Set parameter to generate a result handle
set_texture_inspection_model_param (TextureInspectionModel, \
'gen_result_handle', 'true')
* 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_result 返回值 2 (
H_MSG_TRUE)
if a valid handle is passed and the referred texture inspection model can
be freed correctly. 否则,将抛出异常。
apply_texture_inspection_model
匹配