Skip to content

reconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_lightT_reconstruct_surface_structured_lightπŸ”—

Short descriptionπŸ”—

reconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_lightT_reconstruct_surface_structured_light β€” Reconstruct a surface from a decoded structured light setup.

SignatureπŸ”—

reconstruct_surface_structured_light( structured_light_model StructuredLightModel, out object_model_3d ObjectModel3D )void ReconstructSurfaceStructuredLight( const HTuple& StructuredLightModel, HTuple* ObjectModel3D )static void HOperatorSet.ReconstructSurfaceStructuredLight( HTuple structuredLightModel, out HTuple objectModel3D )def reconstruct_surface_structured_light( structured_light_model: HHandle ) -> HHandle

Herror T_reconstruct_surface_structured_light( const Htuple StructuredLightModel, Htuple* ObjectModel3D )

void HObjectModel3D::ReconstructSurfaceStructuredLight( const HStructuredLightModel& StructuredLightModel )

HObjectModel3D HStructuredLightModel::ReconstructSurfaceStructuredLight( ) const

void HObjectModel3D.ReconstructSurfaceStructuredLight( HStructuredLightModel structuredLightModel )

HObjectModel3D HStructuredLightModel.ReconstructSurfaceStructuredLight( )

DescriptionπŸ”—

reconstruct_surface_structured_lightReconstructSurfaceStructuredLight reconstructs a surface from a structured light setup. Prior to reconstruction, for every projected pattern image, a camera image of the projection on the surface is acquired. For an explanation of the concept of structured light and its supported applications, see the introduction of chapter Inspection / Structured Light. The reconstructed surface is stored in the handle ObjectModel3DobjectModel3Dobject_model_3d.

Reconstruction is possible for non-specular surfaces, using a projector projecting light like an β€˜inverse camera’. In create_structured_light_modelCreateStructuredLightModel, the type of the model must have been set to '3d_reconstruction'"3d_reconstruction".

The reconstruction process uses the vertical decoded correspondence between projector coordinates lighting the camera coordinates, as well as calibration information:

decode_structured_light_patternDecodeStructuredLightPattern must be called before reconstruct_surface_structured_lightReconstructSurfaceStructuredLight, storing the correspondence image between the projector coordinates and the camera coordinates in the model StructuredLightModelstructuredLightModelstructured_light_model, i. e. for each camera pixel which projector pixel lighted (i.e. encoded) the observed point on the surface. reconstruct_surface_structured_lightReconstructSurfaceStructuredLight uses the vertical correspondence image, so the parameter 'pattern_orientation'"pattern_orientation" of set_structured_light_model_paramSetStructuredLightModelParam must have been set to 'vertical'"vertical" or 'both'"both". Note that in most cases 'vertical'"vertical" should be chosen for speed, since fewer images are necessary than for 'both'"both".

For setting the calibration information, please refer to the parameter 'camera_setup_model'"camera_setup_model" of set_structured_light_model_paramSetStructuredLightModelParam.

The reconstruction is performed only within the domain of the correspondence image. Reducing the domain of the input images of decode_structured_light_patternDecodeStructuredLightPattern (e.g., with reduce_domainReduceDomain) can be used to obtain a reduced reconstructed surface, i. e. for shorter runtime or to reduce noise. The resulting ObjectModel3DobjectModel3Dobject_model_3d contains a mapping, so the coordinate images can be obtained by object_model_3d_to_xyzObjectModel3dToXyz using 'from_xyz_map'"from_xyz_map". Pixels for which no reconstruction was possible are excluded from its domain.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

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πŸ”—

StructuredLightModelstructuredLightModelstructured_light_model (input_control) structured_light_model β†’ (handle)HTuple (HHandle)HStructuredLightModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the structured light model.

ObjectModel3DobjectModel3Dobject_model_3d (output_control) object_model_3d β†’ (handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the 3D object model.

ExampleπŸ”—

(HDevelop)

* Set the calibration information
set_structured_light_model_param (StructuredLightModel, \
                                  'camera_setup_model', CameraSetupModelID)
* Decode the camera images
decode_structured_light_pattern (CameraImages, StructuredLightModel)
* Reconstruct the surface
reconstruct_surface_structured_light (StructuredLightModel, ObjectModel3D)

ResultπŸ”—

The operator reconstruct_surface_structured_lightReconstructSurfaceStructuredLight 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

decode_structured_light_patternDecodeStructuredLightPattern

Possible successors

object_model_3d_to_xyzObjectModel3dToXyz

See also

create_structured_light_modelCreateStructuredLightModel, set_structured_light_model_paramSetStructuredLightModelParam

ModuleπŸ”—

3D Metrology