Skip to content

read_structured_light_modelReadStructuredLightModelReadStructuredLightModelread_structured_light_modelT_read_structured_light_model🔗

Short description🔗

read_structured_light_modelReadStructuredLightModelReadStructuredLightModelread_structured_light_modelT_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 )void ReadStructuredLightModel( const HTuple& FileName, HTuple* StructuredLightModel )static void HOperatorSet.ReadStructuredLightModel( HTuple fileName, out HTuple structuredLightModel )def read_structured_light_model( file_name: str ) -> HHandle

Herror T_read_structured_light_model( const Htuple FileName, Htuple* StructuredLightModel )

void HStructuredLightModel::ReadStructuredLightModel( const HString& FileName )

void HStructuredLightModel::ReadStructuredLightModel( const char* FileName )

void HStructuredLightModel::ReadStructuredLightModel( const wchar_t* FileName ) (Windows only)

void HStructuredLightModel.ReadStructuredLightModel( string fileName )

Description🔗

read_structured_light_modelReadStructuredLightModel reads the structured light model StructuredLightModelstructuredLightModelstructured_light_model that has been stored with write_structured_light_modelWriteStructuredLightModel. 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🔗

FileNamefileNamefile_name (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

File name.

File extension: .hslm

StructuredLightModelstructuredLightModelstructured_light_model (output_control) structured_light_model → (handle)HTuple (HHandle)HStructuredLightModel, HTuple (IntPtr)HHandleHtuple (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_modelReadStructuredLightModel 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

write_structured_light_modelWriteStructuredLightModel

See also

create_structured_light_modelCreateStructuredLightModel, clear_structured_light_modelClearStructuredLightModel

Module🔗

3D Metrology