get_texture_inspection_model_paramT_get_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param (算子)
名称
get_texture_inspection_model_paramT_get_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param — 查询纹理检查模型的参数。
签名
描述
算子 get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param is used to query the
values of the different parameters of a texture inspection model
(TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model). The names of the desired parameters are
passed in the parameter GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name, the corresponding values are
returned in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. It is possible to query multiple
parameters with a single call to
get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param. All parameters which can be
manipulated by set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param can be queried.
Please refer to the documentation of
set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param for an explanation of the
individual parameters. It is furthermore possible to query the following
parameters:
- 'gmm_centers'"gmm_centers""gmm_centers""gmm_centers""gmm_centers""gmm_centers":
Returns the number of Gaussian distributions
which were determined as optimal within the training process. The value
can be used as a reference for future texture inspection models.
The range of the possible number of distributions is determined by the
settings of the parameters 'gmm_pmincenters'"gmm_pmincenters""gmm_pmincenters""gmm_pmincenters""gmm_pmincenters""gmm_pmincenters" and
'gmm_pmaxcenters'"gmm_pmaxcenters""gmm_pmaxcenters""gmm_pmaxcenters""gmm_pmaxcenters""gmm_pmaxcenters". Each image pyramid level can have a different
number of Gaussian distributions. By adding an index, the number of
Gaussian distributions for specific pyramid levels can be queried.
For example, 'gmm_centers_3'"gmm_centers_3""gmm_centers_3""gmm_centers_3""gmm_centers_3""gmm_centers_3" returns the number of Gaussian
distributions for the third pyramid level.
- 'image_indices'"image_indices""image_indices""image_indices""image_indices""image_indices":
Returns the indices of the images that have been added to the texture
inspection model using add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImageAddTextureInspectionModelImageadd_texture_inspection_model_image。Only indices of images are returned that are currently in the texture
inspection model and have not been deleted with
remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image。
- 'trained_covartype'"trained_covartype""trained_covartype""trained_covartype""trained_covartype""trained_covartype":
Returns the type of covariance matrix that was used during training.
The user has the possibility to set the preferred type of covariance
matrix by setting 'gmm_covartype'"gmm_covartype""gmm_covartype""gmm_covartype""gmm_covartype""gmm_covartype" with
set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param。However, if the training with
the preferred covariance type fails, training is re-initialized with
a less strict 'gmm_covartype'"gmm_covartype""gmm_covartype""gmm_covartype""gmm_covartype""gmm_covartype". Hence, if training with
'diag'"diag""diag""diag""diag""diag" fails, a further training with 'spherical'"spherical""spherical""spherical""spherical""spherical" is
attempted.
In order to avoid confusions regarding the returned tuple length,
multivalued parameters, such as 'image_indices'"image_indices""image_indices""image_indices""image_indices""image_indices",
'gmm_centers'"gmm_centers""gmm_centers""gmm_centers""gmm_centers""gmm_centers", 'levels'"levels""levels""levels""levels""levels" and 'novelty_threshold'"novelty_threshold""novelty_threshold""novelty_threshold""novelty_threshold""novelty_threshold"
can only be queried alone i.e. without passing any other parameter to
get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param.
有关纹理检查概念的说明,请参阅 检查 / 纹理检查 一章的引言。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model (输入控制) texture_inspection_model → HTextureInspectionModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
纹理检查模型的句柄。
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Name of the queried model parameter.
默认值:
'novelty_threshold'
"novelty_threshold"
"novelty_threshold"
"novelty_threshold"
"novelty_threshold"
"novelty_threshold"
值列表:
'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle", 'gmm_centers'"gmm_centers""gmm_centers""gmm_centers""gmm_centers""gmm_centers", 'gmm_covartype'"gmm_covartype""gmm_covartype""gmm_covartype""gmm_covartype""gmm_covartype", 'gmm_em_max_iter'"gmm_em_max_iter""gmm_em_max_iter""gmm_em_max_iter""gmm_em_max_iter""gmm_em_max_iter", 'gmm_em_regularize'"gmm_em_regularize""gmm_em_regularize""gmm_em_regularize""gmm_em_regularize""gmm_em_regularize", 'gmm_em_threshold'"gmm_em_threshold""gmm_em_threshold""gmm_em_threshold""gmm_em_threshold""gmm_em_threshold", 'gmm_ncomp'"gmm_ncomp""gmm_ncomp""gmm_ncomp""gmm_ncomp""gmm_ncomp", 'gmm_pmaxcenters'"gmm_pmaxcenters""gmm_pmaxcenters""gmm_pmaxcenters""gmm_pmaxcenters""gmm_pmaxcenters", 'gmm_pmincenters'"gmm_pmincenters""gmm_pmincenters""gmm_pmincenters""gmm_pmincenters""gmm_pmincenters", 'gmm_preprocessing'"gmm_preprocessing""gmm_preprocessing""gmm_preprocessing""gmm_preprocessing""gmm_preprocessing", 'gmm_randseed'"gmm_randseed""gmm_randseed""gmm_randseed""gmm_randseed""gmm_randseed", 'gmm_sigma'"gmm_sigma""gmm_sigma""gmm_sigma""gmm_sigma""gmm_sigma", 'image_indices'"image_indices""image_indices""image_indices""image_indices""image_indices", 'levels'"levels""levels""levels""levels""levels", 'novelty_threshold'"novelty_threshold""novelty_threshold""novelty_threshold""novelty_threshold""novelty_threshold", 'num_levels'"num_levels""num_levels""num_levels""num_levels""num_levels", 'patch_normalization'"patch_normalization""patch_normalization""patch_normalization""patch_normalization""patch_normalization", 'patch_rotational_robustness'"patch_rotational_robustness""patch_rotational_robustness""patch_rotational_robustness""patch_rotational_robustness""patch_rotational_robustness", 'patch_size'"patch_size""patch_size""patch_size""patch_size""patch_size", 'sensitivity'"sensitivity""sensitivity""sensitivity""sensitivity""sensitivity", 'trained_covartype'"trained_covartype""trained_covartype""trained_covartype""trained_covartype""trained_covartype"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输出控制) string(-array) → HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Value of the queried model parameter.
示例(HDevelop)
* 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)
* Get parameters
get_texture_inspection_model_param (TextureInspectionModel, 'patch_size', \
PatchSize)
* 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)
结果
算子 get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param 在给定参数有效且在可接受范围内时返回值 2 ( H_MSG_TRUE )。
否则,将抛出异常。
可能的前趋
create_texture_inspection_modelcreate_texture_inspection_modelCreateTextureInspectionModelCreateTextureInspectionModelCreateTextureInspectionModelcreate_texture_inspection_model,
train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModeltrain_texture_inspection_model
可能的后继
add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImageAddTextureInspectionModelImageadd_texture_inspection_model_image,
train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModeltrain_texture_inspection_model
另见
set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param
模块
匹配