deserialize_texture_inspection_modelT_deserialize_texture_inspection_modelDeserializeTextureInspectionModelDeserializeTextureInspectionModel (Operator)

Name

deserialize_texture_inspection_modelT_deserialize_texture_inspection_modelDeserializeTextureInspectionModelDeserializeTextureInspectionModel — Deserialize a serialized texture inspection model.

Signature

deserialize_texture_inspection_model( : : SerializedItemHandle : TextureInspectionModel)

Herror T_deserialize_texture_inspection_model(const Htuple SerializedItemHandle, Htuple* TextureInspectionModel)

void DeserializeTextureInspectionModel(const HTuple& SerializedItemHandle, HTuple* TextureInspectionModel)

void HTextureInspectionModel::DeserializeTextureInspectionModel(const HSerializedItem& SerializedItemHandle)

static void HOperatorSet.DeserializeTextureInspectionModel(HTuple serializedItemHandle, out HTuple textureInspectionModel)

void HTextureInspectionModel.DeserializeTextureInspectionModel(HSerializedItem serializedItemHandle)

Description

deserialize_texture_inspection_modeldeserialize_texture_inspection_modelDeserializeTextureInspectionModelDeserializeTextureInspectionModelDeserializeTextureInspectionModel deserializes a texture inspection model, that was serialized by serialize_texture_inspection_modelserialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelSerializeTextureInspectionModel (see fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItem for an introduction of the basic principle of serialization). The serialized texture inspection model is defined by the handle SerializedItemHandleSerializedItemHandleSerializedItemHandleSerializedItemHandleserializedItemHandle. The deserialized values are stored in an automatically created texture inspection model with the handle TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel.

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

SerializedItemHandleSerializedItemHandleSerializedItemHandleSerializedItemHandleserializedItemHandle (input_control)  serialized_item HSerializedItem, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the serialized item.

TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel (output_control, state is modified)  texture_inspection_model HTextureInspectionModel, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the texture inspection model.

Example (HDevelop)

* Create texture inspection model
create_texture_inspection_model ('basic', TextureInspectionModel)
* Set parameters
set_texture_inspection_model_param (TextureInspectionModel, \
                                    'gen_result_handle', 'true')
* 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)
* Serialize texture inspection model
serialize_texture_inspection_model (TextureInspectionModel, \
                                    SerializedItemHandle)
* Deserialize in Model
deserialize_texture_inspection_model (SerializedItemHandle, \
                                      TextureInspectionModelSerialized)
* Read and apply a test image
read_image (TestImage, 'carpet/carpet_02')
apply_texture_inspection_model (TestImage, DefectCandidates, \
                                TextureInspectionModelSerialized, \
                                TextureInspectionResultID)

Result

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

Possible Predecessors

fread_serialized_itemfread_serialized_itemFreadSerializedItemFreadSerializedItemFreadSerializedItem, receive_serialized_itemreceive_serialized_itemReceiveSerializedItemReceiveSerializedItemReceiveSerializedItem, serialize_texture_inspection_modelserialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelSerializeTextureInspectionModel

Possible Successors

apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModel

See also

create_texture_inspection_modelcreate_texture_inspection_modelCreateTextureInspectionModelCreateTextureInspectionModelCreateTextureInspectionModel, write_texture_inspection_modelwrite_texture_inspection_modelWriteTextureInspectionModelWriteTextureInspectionModelWriteTextureInspectionModel, serialize_texture_inspection_modelserialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelSerializeTextureInspectionModel

Module

Matching