read_structured_light_modelT_read_structured_light_modelReadStructuredLightModelReadStructuredLightModel (Operator)

Name

read_structured_light_modelT_read_structured_light_modelReadStructuredLightModelReadStructuredLightModel — Read a structured light model from a file.

Signature

read_structured_light_model( : : FileName : StructuredLightModel)

Herror T_read_structured_light_model(const Htuple FileName, Htuple* StructuredLightModel)

void ReadStructuredLightModel(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)

static void HOperatorSet.ReadStructuredLightModel(HTuple fileName, out HTuple structuredLightModel)

void HStructuredLightModel.ReadStructuredLightModel(string fileName)

Description

read_structured_light_modelread_structured_light_modelReadStructuredLightModelReadStructuredLightModelReadStructuredLightModel reads the structured light model StructuredLightModelStructuredLightModelStructuredLightModelStructuredLightModelstructuredLightModel that has been stored with write_structured_light_modelwrite_structured_light_modelWriteStructuredLightModelWriteStructuredLightModelWriteStructuredLightModel. 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

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

FileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleHtuple (string) (string) (HString) (char*)

File name.

File extension: .hslm

StructuredLightModelStructuredLightModelStructuredLightModelStructuredLightModelstructuredLightModel (output_control)  structured_light_model HStructuredLightModel, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (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_modelread_structured_light_modelReadStructuredLightModelReadStructuredLightModelReadStructuredLightModel returns the value 2 (H_MSG_TRUE) if the given parameters are valid. Otherwise, an exception will be raised.

Possible Predecessors

write_structured_light_modelwrite_structured_light_modelWriteStructuredLightModelWriteStructuredLightModelWriteStructuredLightModel

See also

create_structured_light_modelcreate_structured_light_modelCreateStructuredLightModelCreateStructuredLightModelCreateStructuredLightModel, clear_structured_light_modelclear_structured_light_modelClearStructuredLightModelClearStructuredLightModelClearStructuredLightModel

Module

3D Metrology