Skip to content

remove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_imageT_remove_texture_inspection_model_image🔗

Short description🔗

remove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_imageT_remove_texture_inspection_model_image — Clear all or a user-defined subset of the images of a texture inspection model.

Signature🔗

remove_texture_inspection_model_image( texture_inspection_model TextureInspectionModel, integer Indices, out integer RemainingIndices )void RemoveTextureInspectionModelImage( const HTuple& TextureInspectionModel, const HTuple& Indices, HTuple* RemainingIndices )static void HOperatorSet.RemoveTextureInspectionModelImage( HTuple textureInspectionModel, HTuple indices, out HTuple remainingIndices )def remove_texture_inspection_model_image( texture_inspection_model: MaybeSequence[HHandle], indices: Sequence[int] ) -> Sequence[int]

Herror T_remove_texture_inspection_model_image( const Htuple TextureInspectionModel, const Htuple Indices, Htuple* RemainingIndices )

static HTuple HTextureInspectionModel::RemoveTextureInspectionModelImage( const HTextureInspectionModelArray& TextureInspectionModel, const HTuple& Indices )

HTuple HTextureInspectionModel::RemoveTextureInspectionModelImage( const HTuple& Indices ) const

static HTuple HTextureInspectionModel.RemoveTextureInspectionModelImage( HTextureInspectionModel[] textureInspectionModel, HTuple indices )

HTuple HTextureInspectionModel.RemoveTextureInspectionModelImage( HTuple indices )

Description🔗

remove_texture_inspection_model_imageRemoveTextureInspectionModelImage clears all or certain selected images that have been stored in a texture inspection model TextureInspectionModeltextureInspectionModeltexture_inspection_model.

On the one hand, the usage of remove_texture_inspection_model_imageRemoveTextureInspectionModelImage is recommended to reduce the storage space of a saved texture inspection model. This is especially of advantage if the texture inspection model has been trained in an offline process and written with write_texture_inspection_modelWriteTextureInspectionModel. In this case, test images can still be classified using apply_texture_inspection_modelApplyTextureInspectionModel, while the required storage space is reduced to a minimum. On the other hand, it offers a simple way to delete certain selected images of the texture inspection model that are not needed (anymore) for a subsequent classification process. This allows the user to proceed with an entirely configured model, while only the used image data has to be tuned to solve the underlying inspection problem. Please note that after removing images from the model a retraining is required.

In order to specifically delete images from the texture inspection model, the indices of the respective images have to be specified in the parameter Indicesindicesindices. A validation of all images that are still in the texture inspection model can be made using the value 'image_indices'"image_indices" in get_texture_inspection_model_paramGetTextureInspectionModelParam. If the user still passes unassigned indices to delete images, these indices are ignored. Besides the above mentioned option, remove_texture_inspection_model_imageRemoveTextureInspectionModelImage also allows to set the parameter Indicesindicesindices to the value 'all'"all". In this case, all images of the texture inspection model are deleted.

It should be noted that after deleting all images, the model can only be (re)trained, if new images are added using add_texture_inspection_model_imageAddTextureInspectionModelImage. In the case that only a subset of all images has been deleted, a call of train_texture_inspection_modelTrainTextureInspectionModel requires all steps of the training to be executed, since potentially still available training data does not match the used data.

After calling remove_texture_inspection_model_imageRemoveTextureInspectionModelImage, the remaining indices of the images that are still in the texture inspection model are returned in the parameter RemainingIndicesremainingIndicesremaining_indices.

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters🔗

TextureInspectionModeltextureInspectionModeltexture_inspection_model (input_control, state is modified) texture_inspection_model(-array) → (handle)HTuple (HHandle)HTextureInspectionModel, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Handle of the texture inspection model.

Indicesindicesindices (input_control) integer-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Indices of the images to be deleted from the texture inspection model.

RemainingIndicesremainingIndicesremaining_indices (output_control) integer-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Indices of the images that remain in the texture inspection model.

Example🔗

(HDevelop)

* Create texture inspection model
create_texture_inspection_model ('basic', TextureInspectionModel)
* Read and add training images
read_image (TrainImage, 'carpet/carpet_01')
add_texture_inspection_model_image (TrainImage, TextureInspectionModel, \
                                    Indices)
* Get added training images
get_texture_inspection_model_image (TrainImageOut, TextureInspectionModel)
* Remove training images
remove_texture_inspection_model_image (TextureInspectionModel, Indices, \
                                       RemainingIndices)

Result🔗

If the parameters are valid, the operator remove_texture_inspection_model_imageRemoveTextureInspectionModelImage returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

train_texture_inspection_modelTrainTextureInspectionModel

See also

create_texture_inspection_modelCreateTextureInspectionModel, clear_texture_inspection_modelClearTextureInspectionModel, set_texture_inspection_model_paramSetTextureInspectionModelParam, get_texture_inspection_model_paramGetTextureInspectionModelParam, add_texture_inspection_model_imageAddTextureInspectionModelImage

Module🔗

Matching