网淘巴来吧,欢迎您!

返回首页 微信
微信
手机版
手机版

create_texture_inspection_model -创建纹理检查模型

2022-11-05 新闻来源:网淘巴 围观:216
''

简短描述

create_texture_inspection_model -创建纹理检查模型。

签名

create_texture_inspection_model(:: ModelType: TextureInspectionModel)

描述

create_texture_inspection_model创建一个类型为ModelType的新的纹理检查模型。目前只支持“basic”类型。

纹理检测的参数可以通过get_texture_inspection_model_param来查询,也可以通过调用set_texture_inspection_model_param来操作。

因为create_texture_inspection_model和后续的操作符为纹理检查模型分配内存,所以当模型不再需要时,必须用clear_texture_inspection_model清除它。

 

参数

ModelType (input_control) string→(string)

创建的纹理检测模型的类型。

默认值:'basic'

texture_inspectionmodel (output_control)→(integer)

使用和访问纹理检查模型的句柄。

例程

* 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)
* Clean up
clear_texture_inspection_model (TextureInspectionModel)

 

 

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

本文链接:https://www.wtao8.com/post/234.html 转载需授权!

分享到:

相关文章

龙年
大发