write_structured_light_model — Write a structured light model to a file.
write_structured_light_model( : : StructuredLightModel, FileName : )
write_structured_light_model writes the structured light model
StructuredLightModel to the file given by FileName. The
default HALCON file extension for the structured light model is 'hslm'.
The structured light model can be then read with
read_structured_light_model. It should be noted that
write_structured_light_model does not write any
previously generated pattern images in the structured light model. In other
words, only the parameters of the model and objects that were already
generated will be written in the file. The list of structured light objects
and how to generate each can be found in
get_structured_light_object.
For an explanation of the concept of structured light and its supported applications, see the introduction of chapter Inspection / Structured Light.
StructuredLightModel (input_control) structured_light_model → (handle)
Handle of the structured light model.
FileName (input_control) filename.write → (string)
File name.
File extension: .hslm
* Create the model
create_structured_light_model ('deflectometry', StructuredLightModel)
* Generate the patterns to project
gen_structured_light_pattern (PatternImages, StructuredLightModel)
* Decode the camera images
decode_structured_light_pattern (CameraImages, StructuredLightModel)
* Write the model
write_structured_light_model (StructuredLightModel, 'ExampleModel.hslm')
The operator write_structured_light_model returns the value
2 (H_MSG_TRUE) if the given parameters are valid. Otherwise, an exception will be
raised.
create_structured_light_model,
clear_structured_light_model
3D Metrology