reconstruct_surface_structured_lightT_reconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_light (Operator)

Name

reconstruct_surface_structured_lightT_reconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_light — Reconstruct a surface from a decoded structured light setup.

Signature

reconstruct_surface_structured_light( : : StructuredLightModel : ObjectModel3D)

Herror T_reconstruct_surface_structured_light(const Htuple StructuredLightModel, Htuple* ObjectModel3D)

void ReconstructSurfaceStructuredLight(const HTuple& StructuredLightModel, HTuple* ObjectModel3D)

void HObjectModel3D::ReconstructSurfaceStructuredLight(const HStructuredLightModel& StructuredLightModel)

HObjectModel3D HStructuredLightModel::ReconstructSurfaceStructuredLight() const

static void HOperatorSet.ReconstructSurfaceStructuredLight(HTuple structuredLightModel, out HTuple objectModel3D)

void HObjectModel3D.ReconstructSurfaceStructuredLight(HStructuredLightModel structuredLightModel)

HObjectModel3D HStructuredLightModel.ReconstructSurfaceStructuredLight()

def reconstruct_surface_structured_light(structured_light_model: HHandle) -> HHandle

Description

reconstruct_surface_structured_lightreconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_light 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 ObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d.

Reconstruction is possible for non-specular surfaces, using a projector projecting light like an 'inverse camera'. In create_structured_light_modelcreate_structured_light_modelCreateStructuredLightModelCreateStructuredLightModelcreate_structured_light_model, the type of the model must have been set to '3d_reconstruction'"3d_reconstruction""3d_reconstruction""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_patterndecode_structured_light_patternDecodeStructuredLightPatternDecodeStructuredLightPatterndecode_structured_light_pattern must be called before reconstruct_surface_structured_lightreconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_light, storing the correspondence image between the projector coordinates and the camera coordinates in the model StructuredLightModelStructuredLightModelStructuredLightModelstructuredLightModelstructured_light_model, i. e. for each camera pixel which projector pixel lighted (i.e. encoded) the observed point on the surface. reconstruct_surface_structured_lightreconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_light uses the vertical correspondence image, so the parameter 'pattern_orientation'"pattern_orientation""pattern_orientation""pattern_orientation""pattern_orientation" of set_structured_light_model_paramset_structured_light_model_paramSetStructuredLightModelParamSetStructuredLightModelParamset_structured_light_model_param must have been set to 'vertical'"vertical""vertical""vertical""vertical" or 'both'"both""both""both""both". Note that in most cases 'vertical'"vertical""vertical""vertical""vertical" should be chosen for speed, since fewer images are necessary than for 'both'"both""both""both""both".

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

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

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

StructuredLightModelStructuredLightModelStructuredLightModelstructuredLightModelstructured_light_model (input_control)  structured_light_model HStructuredLightModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the structured light model.

ObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (output_control)  object_model_3d HObjectModel3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (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_lightreconstruct_surface_structured_lightReconstructSurfaceStructuredLightReconstructSurfaceStructuredLightreconstruct_surface_structured_light returns the value 2 ( H_MSG_TRUE) if the given parameters are valid. Otherwise, an exception will be raised.

Possible Predecessors

decode_structured_light_patterndecode_structured_light_patternDecodeStructuredLightPatternDecodeStructuredLightPatterndecode_structured_light_pattern

Possible Successors

object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyzobject_model_3d_to_xyz

See also

create_structured_light_modelcreate_structured_light_modelCreateStructuredLightModelCreateStructuredLightModelcreate_structured_light_model, set_structured_light_model_paramset_structured_light_model_paramSetStructuredLightModelParamSetStructuredLightModelParamset_structured_light_model_param

Module

3D Metrology