简短描述
add_texture_inspection_model_image -添加训练图像到纹理检查模型
签名
add_texture_inspection_model_image(Image : : TextureInspectionModel : Indices)
描述
add_texture_inspection_model_image将训练图像添加到纹理检查模型(TextureInspectionModel)。所有进一步的计算都将考虑训练图像的域。由于特征提取考虑了每个像素的一定邻域,因此无法提取域边界像素的特征。border size()取决于'patch_size'并计算为所有添加到纹理检查模型的图像都在训练过程中使用(参见train_texture_inspection_model了解更多信息)。此外,还可以使用get_texture_inspection_model_image查询传递给纹理检查模型的所有图像。
每个添加的图像都接收一个索引(indexes),它允许用户在添加的图像和他的图像数据之间生成一个赋值。通过调用remove_texture_inspection_model_image,可以进一步使用索引从模型中删除不再需要的图像。
参数
Image (input_object) singlechannelimage(-array)→object (byte / uint2)
无瑕疵纹理的图像。
texture_inspectionmodel (input_control, state is modified)→(integer)
纹理检查模型的句柄。
index (output_control) integer(-array)→(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 (TrainImage, 'carpet/carpet_02')
apply_texture_inspection_model (TestImage, DefectCandidates, \
TextureInspectionModel, \
TextureInspectionResultID)
* Clean up
clear_texture_inspection_model (TextureInspectionModel)
天猫隐藏优惠券
网淘吧
免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

微信扫一扫,打赏作者吧~
网友评论
最新评论