serialize_texture_inspection_modelT_serialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelserialize_texture_inspection_model (Operator)
Name
serialize_texture_inspection_modelT_serialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelserialize_texture_inspection_model
— Serialize a texture inspection model.
Signature
Description
serialize_texture_inspection_modelserialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelSerializeTextureInspectionModelserialize_texture_inspection_model
serializes a texture inspection
model (see fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItemfwrite_serialized_item
for an introduction of the basic principle of serialization).
The texture inspection model is defined by the handle
TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model
. The serialized texture inspection model is
returned by the handle SerializedItemHandleSerializedItemHandleSerializedItemHandleSerializedItemHandleserializedItemHandleserialized_item_handle
and can be deserialized
by deserialize_texture_inspection_modeldeserialize_texture_inspection_modelDeserializeTextureInspectionModelDeserializeTextureInspectionModelDeserializeTextureInspectionModeldeserialize_texture_inspection_model
.
For an explanation of the concept of the texture inspection
see the introduction of chapter Inspection / Texture Inspection.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model
(input_control) texture_inspection_model →
HTextureInspectionModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the texture inspection model.
SerializedItemHandleSerializedItemHandleSerializedItemHandleSerializedItemHandleserializedItemHandleserialized_item_handle
(output_control) serialized_item →
HSerializedItem, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the serialized item.
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
serialize_texture_inspection_modelserialize_texture_inspection_modelSerializeTextureInspectionModelSerializeTextureInspectionModelSerializeTextureInspectionModelserialize_texture_inspection_model
returns the value TRUE. If
necessary, an exception is raised.
Possible Predecessors
train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModeltrain_texture_inspection_model
Possible Successors
clear_texture_inspection_modelclear_texture_inspection_modelClearTextureInspectionModelClearTextureInspectionModelClearTextureInspectionModelclear_texture_inspection_model
,
fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItemfwrite_serialized_item
,
send_serialized_itemsend_serialized_itemSendSerializedItemSendSerializedItemSendSerializedItemsend_serialized_item
,
deserialize_texture_inspection_modeldeserialize_texture_inspection_modelDeserializeTextureInspectionModelDeserializeTextureInspectionModelDeserializeTextureInspectionModeldeserialize_texture_inspection_model
See also
create_texture_inspection_modelcreate_texture_inspection_modelCreateTextureInspectionModelCreateTextureInspectionModelCreateTextureInspectionModelcreate_texture_inspection_model
,
read_texture_inspection_modelread_texture_inspection_modelReadTextureInspectionModelReadTextureInspectionModelReadTextureInspectionModelread_texture_inspection_model
,
deserialize_texture_inspection_modeldeserialize_texture_inspection_modelDeserializeTextureInspectionModelDeserializeTextureInspectionModelDeserializeTextureInspectionModeldeserialize_texture_inspection_model
Module
Matching