create_texture_inspection_model — 创建纹理检查模型。
create_texture_inspection_model( : : ModelType : TextureInspectionModel)
create_texture_inspection_model creates a new texture inspection
model of type ModelType. Currently, only the model type
'basic' is supported.
The parameters of the texture inspection can be queried with
get_texture_inspection_model_param and manipulated by calls to
set_texture_inspection_model_param。
有关纹理检查概念的说明,请参阅 检查 / 纹理检查 一章的引言。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
ModelType (输入控制) string → (string)
The type of the created texture inspection model.
默认值: 'basic'
值列表: 'basic'
TextureInspectionModel (输出控制) texture_inspection_model → (handle)
Handle for using and accessing the texture inspection model.
* 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)
* Read and apply a test image
read_image (TestImage, 'carpet/carpet_02')
apply_texture_inspection_model (TestImage, DefectCandidates, \
TextureInspectionModel, \
TextureInspectionResultID)
算子 create_texture_inspection_model 返回值 2 (
H_MSG_TRUE)
in the texture inspection model can be allocated correctly. 否则,将抛出异常。.
set_texture_inspection_model_param,
get_texture_inspection_model_param,
add_texture_inspection_model_image
匹配