ClassesClasses | | Operators

add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImage (Operator)

Name

add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImage — Add training images to the texture inspection model.

Signature

add_texture_inspection_model_image(Image : : TextureInspectionModel : Indices)

Herror add_texture_inspection_model_image(const Hobject Image, const Hlong TextureInspectionModel, Hlong* Indices)

Herror T_add_texture_inspection_model_image(const Hobject Image, const Htuple TextureInspectionModel, Htuple* Indices)

void AddTextureInspectionModelImage(const HObject& Image, const HTuple& TextureInspectionModel, HTuple* Indices)

HTuple HImage::AddTextureInspectionModelImage(const HTextureInspectionModel& TextureInspectionModel) const

HTuple HTextureInspectionModel::AddTextureInspectionModelImage(const HImage& Image) const

static HTuple HTextureInspectionResult::AddTextureInspectionModelImage(const HImage& Image, const HTextureInspectionModel& TextureInspectionModel)

static void HOperatorSet.AddTextureInspectionModelImage(HObject image, HTuple textureInspectionModel, out HTuple indices)

HTuple HImage.AddTextureInspectionModelImage(HTextureInspectionModel textureInspectionModel)

HTuple HTextureInspectionModel.AddTextureInspectionModelImage(HImage image)

static HTuple HTextureInspectionResult.AddTextureInspectionModelImage(HImage image, HTextureInspectionModel textureInspectionModel)

Description

add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImageAddTextureInspectionModelImage adds training images to the texture inspection model (TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel). The domain of the training images is considered in all further calculations. Since the feature extraction considers a certain neighborhood of each pixel, no features can be extracted for pixels at the border of the domain. The border size ( ) depends on the 'patch_size'"patch_size""patch_size""patch_size""patch_size" and computes to

All images which are added to the texture inspection model are used within the training process (see train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModel for more information). Furthermore, it is possible to query all of the images passed to the texture inspection model with get_texture_inspection_model_imageget_texture_inspection_model_imageGetTextureInspectionModelImageGetTextureInspectionModelImageGetTextureInspectionModelImage.

Every added image receives an index (IndicesIndicesIndicesIndicesindices), which allows the user to generate an assignment between the added images and his image data. By calls of remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImage, the index can further be used to delete images from the model that are not needed anymore.

For an explanation of the concept of the texture inspection see the introduction of chapter Inspection / Texture Inspection.

Execution Information

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

ImageImageImageImageimage (input_object)  singlechannelimage(-array) objectHImageHImageHobject (byte / uint2)

Image of flawless texture.

TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel (input_control, state is modified)  texture_inspection_model HTextureInspectionModel, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the texture inspection model.

IndicesIndicesIndicesIndicesindices (output_control)  integer(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indices of the images that have been added to the texture inspection model.

Example (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)
* 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)

Result

The operator add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImageAddTextureInspectionModelImage returns the value 2 (H_MSG_TRUE) if the given parameters are valid and within acceptable range. Otherwise, an exception will be raised.

Possible Predecessors

create_texture_inspection_modelcreate_texture_inspection_modelCreateTextureInspectionModelCreateTextureInspectionModelCreateTextureInspectionModel, set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParam, get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParam

Possible Successors

train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModel, clear_texture_inspection_modelclear_texture_inspection_modelClearTextureInspectionModelClearTextureInspectionModelClearTextureInspectionModel, remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImage, get_texture_inspection_model_imageget_texture_inspection_model_imageGetTextureInspectionModelImageGetTextureInspectionModelImageGetTextureInspectionModelImage

Module

Matching


ClassesClasses | | Operators