Skip to content

write_structured_light_modelWriteStructuredLightModelWriteStructuredLightModelwrite_structured_light_modelT_write_structured_light_model🔗

Short description🔗

write_structured_light_modelWriteStructuredLightModelWriteStructuredLightModelwrite_structured_light_modelT_write_structured_light_model — Write a structured light model to a file.

Signature🔗

write_structured_light_model( structured_light_model StructuredLightModel, filename.write FileName )void WriteStructuredLightModel( const HTuple& StructuredLightModel, const HTuple& FileName )static void HOperatorSet.WriteStructuredLightModel( HTuple structuredLightModel, HTuple fileName )def write_structured_light_model( structured_light_model: HHandle, file_name: str ) -> None

Herror T_write_structured_light_model( const Htuple StructuredLightModel, const Htuple FileName )

void HStructuredLightModel::WriteStructuredLightModel( const HString& FileName ) const

void HStructuredLightModel::WriteStructuredLightModel( const char* FileName ) const

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

void HStructuredLightModel.WriteStructuredLightModel( string fileName )

Description🔗

write_structured_light_modelWriteStructuredLightModel writes the structured light model StructuredLightModelstructuredLightModelstructured_light_model to the file given by FileNamefileNamefile_name. The default HALCON file extension for the structured light model is 'hslm'. The structured light model can be then read with read_structured_light_modelReadStructuredLightModel. It should be noted that write_structured_light_modelWriteStructuredLightModel 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_objectGetStructuredLightObject.

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.

Parameters🔗

StructuredLightModelstructuredLightModelstructured_light_model (input_control) structured_light_model → (handle)HTuple (HHandle)HStructuredLightModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the structured light model.

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

File name.

File extension: .hslm

Example🔗

(HDevelop)

* 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')

Result🔗

The operator write_structured_light_modelWriteStructuredLightModel 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 successors

clear_structured_light_modelClearStructuredLightModel

See also

create_structured_light_modelCreateStructuredLightModel, clear_structured_light_modelClearStructuredLightModel

Module🔗

3D Metrology