read_structured_light_model🔗
Short description🔗
read_structured_light_model — Read a structured light model from a file.
Signature🔗
read_structured_light_model( filename.read FileName, out structured_light_model StructuredLightModel )
Description🔗
read_structured_light_model reads the structured light model
StructuredLightModel that has been stored with
write_structured_light_model. The default HALCON file extension
for the structured light model is 'hslm'.
It can be helpful to write a model after setting all the optimal parameters for a particular setup. The model can be read later to easily regenerate pattern images. The objects already generated in the model before writing it can be also revisited later after reading the model.
For an explanation of the concept of structured light and its supported applications, see the introduction of chapter Inspection / Structured Light.
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 returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Parameters🔗
FileName (input_control) filename.read → (string)
File name.
File extension: .hslm
StructuredLightModel (output_control) structured_light_model → (handle)
Handle of the structured light model.
Example🔗
(HDevelop)
* Read the model
read_structured_light_model ('ExampleModel.hslm', StructuredLightModel)
* Get a previously decoded result
get_structured_light_object (CorrespondenceImages, StructuredLightModel, \
'correspondence_image')
* Decode new camera images
decode_structured_light_pattern (CameraImages, StructuredLightModel)
* Get the decoded result
get_structured_light_object (CorrespondenceImagesNew, StructuredLightModel, \
'correspondence_image')
Result🔗
The operator read_structured_light_model returns the value
2 (H_MSG_TRUE) if the given parameters are valid. Otherwise, an exception will be
raised.
Combinations with other operators🔗
Combinations
Possible predecessors
See also
Module🔗
3D Metrology