read_structured_light_modelT_read_structured_light_modelReadStructuredLightModelReadStructuredLightModelread_structured_light_model (Operator)

Name

read_structured_light_modelT_read_structured_light_modelReadStructuredLightModelReadStructuredLightModelread_structured_light_model — 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)

def read_structured_light_model(file_name: str) -> HHandle

Description

read_structured_light_modelread_structured_light_modelReadStructuredLightModelReadStructuredLightModelReadStructuredLightModelread_structured_light_model reads the structured light model StructuredLightModelStructuredLightModelStructuredLightModelStructuredLightModelstructuredLightModelstructured_light_model that has been stored with write_structured_light_modelwrite_structured_light_modelWriteStructuredLightModelWriteStructuredLightModelWriteStructuredLightModelwrite_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

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

FileNameFileNameFileNameFileNamefileNamefile_name (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

File name.

File extension: .hslm

StructuredLightModelStructuredLightModelStructuredLightModelStructuredLightModelstructuredLightModelstructured_light_model (output_control)  structured_light_model HStructuredLightModel, HTupleHHandleHTupleHtuple (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_modelReadStructuredLightModelReadStructuredLightModelReadStructuredLightModelread_structured_light_model 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_modelWriteStructuredLightModelWriteStructuredLightModelWriteStructuredLightModelwrite_structured_light_model

See also

create_structured_light_modelcreate_structured_light_modelCreateStructuredLightModelCreateStructuredLightModelCreateStructuredLightModelcreate_structured_light_model, clear_structured_light_modelclear_structured_light_modelClearStructuredLightModelClearStructuredLightModelClearStructuredLightModelclear_structured_light_model

Module

3D Metrology