Skip to content

register_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalregister_object_model_3d_globalT_register_object_model_3d_global🔗

Short description🔗

register_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalregister_object_model_3d_globalT_register_object_model_3d_global — Improve the relative transformations between 3D object models based on their overlaps.

Signature🔗

register_object_model_3d_global( object_model_3d ObjectModels3D, hom_mat3d HomMats3D, number From, number To, string GenParamName, number GenParamValue, out hom_mat3d HomMats3DOut, out number Scores )void RegisterObjectModel3dGlobal( const HTuple& ObjectModels3D, const HTuple& HomMats3D, const HTuple& From, const HTuple& To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* HomMats3DOut, HTuple* Scores )static void HOperatorSet.RegisterObjectModel3dGlobal( HTuple objectModels3D, HTuple homMats3D, HTuple from, HTuple to, HTuple genParamName, HTuple genParamValue, out HTuple homMats3DOut, out HTuple scores )def register_object_model_3d_global( object_models_3d: MaybeSequence[HHandle], hom_mats_3d: Sequence[Union[int, float]], from_val: MaybeSequence[Union[int, str]], to: MaybeSequence[int], gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, str, float]] ) -> Tuple[Sequence[Union[int, float]], Sequence[float]]

Herror T_register_object_model_3d_global( const Htuple ObjectModels3D, const Htuple HomMats3D, const Htuple From, const Htuple To, const Htuple GenParamName, const Htuple GenParamValue, Htuple* HomMats3DOut, Htuple* Scores )

static HHomMat3DArray HObjectModel3D::RegisterObjectModel3dGlobal( const HObjectModel3DArray& ObjectModels3D, const HHomMat3DArray& HomMats3D, const HTuple& From, const HTuple& To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores )

HHomMat3DArray HObjectModel3D::RegisterObjectModel3dGlobal( const HHomMat3DArray& HomMats3D, const HString& From, Hlong To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores ) const

HHomMat3DArray HObjectModel3D::RegisterObjectModel3dGlobal( const HHomMat3DArray& HomMats3D, const char* From, Hlong To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores ) const

HHomMat3DArray HObjectModel3D::RegisterObjectModel3dGlobal( const HHomMat3DArray& HomMats3D, const wchar_t* From, Hlong To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores ) const (Windows only)

static HHomMat3D[] HObjectModel3D.RegisterObjectModel3dGlobal( HObjectModel3D[] objectModels3D, HHomMat3D[] homMats3D, HTuple from, HTuple to, HTuple genParamName, HTuple genParamValue, out HTuple scores )

HHomMat3D[] HObjectModel3D.RegisterObjectModel3dGlobal( HHomMat3D[] homMats3D, string from, int to, HTuple genParamName, HTuple genParamValue, out HTuple scores )

Description🔗

register_object_model_3d_globalRegisterObjectModel3dGlobal improves the relative transformations between 3D object models, which is called global registration. In particular, under the assumption that all input 3D objects models in ObjectModels3DobjectModels3Dobject_models_3d have a known approximated spatial relation, all possible pairwise overlapping areas are calculated and optimized for a better alignment. The resulting offset is then synchronously minimized for all pairs. The entire process is then repeated iteratively from the newly resulting starting poses. The result in HomMats3DOuthomMats3DOuthom_mats_3dout describes a transformation that can be applied with affine_trans_object_model_3dAffineTransObjectModel3d to the input 3D object models to transform all in a common reference frame. Scoresscoresscores contains for every 3D object model the number of found neighbors with a sufficient overlap. If no overlap is found for at least one object, an exception is raised.

Three types for the interpretation of the starting poses in HomMats3DhomMats3Dhom_mats_3d are available, which is controlled by the parameters Fromfromfrom and Tototo:

First, if Fromfromfrom is set to 'global'"global", the parameter HomMats3DhomMats3Dhom_mats_3d must contain a rigid transformation with 12 entries for each 3D object model in ObjectModels3DobjectModels3Dobject_models_3d that describes its position in relation to a common global reference frame. In this case, Tototo must be empty. This case is suitable, e.g., if transformations are applied by a turning table or a robot to either the camera or the object. In this case, all neighborhoods that are possible are considered for the global optimization.

Second, if Fromfromfrom is set to 'previous'"previous", the parameter HomMats3DhomMats3Dhom_mats_3d must contain a rigid transformation for each subsequent pair of 3D object models in ObjectModels3DobjectModels3Dobject_models_3d (one less than for the first case). An example for this situation might be a matching applied consecutively to the previous frame (e.g., with register_object_model_3d_pairRegisterObjectModel3dPair). Tototo must be empty again. In this case, all neighborhoods that are possible are considered for the global optimization.

Third, you can describe any transformation in HomMats3DhomMats3Dhom_mats_3d by setting Fromfromfrom and Tototo to the indices of the 3D object models for which the corresponding transformation is valid. That is, a given transformation describes the transformation that is needed to move the 3D object model with the index that is specified in Fromfromfrom into the coordinate system of the 3D object model with the corresponding index that is specified in Tototo. In this case, HomMats3DhomMats3Dhom_mats_3d should contain all possible neighborhood relations between the objects, since no other than these neighborhoods are considered for the optimization. Please consider, that for all 3D object models at least one path of transformations to each other 3D object model must be contained in the such specified transformations.

If ObjectModels3DobjectModels3Dobject_models_3d contains 3D-primitives, they will internally be transformed into point clouds and will be considered as such.

The accuracy of the returned poses is limited to around 0.1% of the size of the point clouds due to numerical reasons. The accuracy further depends on the noise of the data points, the number of data points and the shape of the point clouds.

The process of the global registration can be controlled further by the following generic parameters in GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value:

  • 'default_parameters'"default_parameters": Allows to choose between two default parameter sets, i.e., it allows to switch between a 'fast'"fast" and an 'accurate'"accurate" set of parameters.

    List of values: 'fast'"fast", 'accurate'"accurate".

    Default: 'accurate'"accurate".

  • 'rel_sampling_distance'"rel_sampling_distance": The relative sampling rate of the 3D object models. This value is relative to the object’s diameter and refers to the minimal distance between two sampled points. A higher value leads to faster results, whereas a lower value leads to more accurate results.

    Suggested values: 0.030.03, 0.050.05, 0.070.07.

    Default: 0.050.05 ('default_parameters'"default_parameters" = 'accurate'"accurate"), 0.070.07 ('default_parameters'"default_parameters" = 'fast'"fast").

    Restriction: 0 < 'rel_sampling_distance'"rel_sampling_distance" < 1

  • 'pose_ref_sub_sampling'"pose_ref_sub_sampling": Number of points that are skipped for the pose refinement. The value specifies the number of points that are skipped per selected point. Increasing this value allows faster convergence at the cost of less accurate results. The internally used method for the refinement is asymmetric and this parameter only affects the second model of each tested pair.

    Suggested values: 11, 22, 2020.

    Default: 22 ('default_parameters'"default_parameters" = 'accurate'"accurate"), 1010 ('default_parameters'"default_parameters" = 'fast'"fast").

    Restriction: 'pose_ref_sub_sampling'"pose_ref_sub_sampling" > 0

  • 'max_num_iterations'"max_num_iterations": Number of iterations applied to adjust the initial alignment. The better the initial alignment is, the less iterations are necessary.

    Suggested values: 11, 33, 1010.

    Default: 33.

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 supports canceling timeouts and interrupts.

Parameters🔗

ObjectModels3DobjectModels3Dobject_models_3d (input_control) object_model_3d(-array) → (handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Handles of several 3D object models.

HomMats3DhomMats3Dhom_mats_3d (input_control) hom_mat3d-array → (real / integer)HTuple (double / Hlong)HHomMat3D, HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

Approximate relative transformations between the 3D object models.

Fromfromfrom (input_control) number(-array) → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)MaybeSequence[Union[int, str]]Htuple (char* / Hlong)

Type of interpretation for the transformations.

Default: 'global'"global"
List of values: 0, 1, 2, 3, 4, 'global', 'previous'0, 1, 2, 3, 4, "global", "previous"

Tototo (input_control) number(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Target indices of the transformations if Fromfromfrom specifies the source indices, otherwise the parameter must be empty.

Default: [][]
List of values: 0, 1, 2, 3, 40, 1, 2, 3, 4

GenParamNamegenParamNamegen_param_name (input_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Names of the generic parameters that can be adjusted for the global 3D object model registration.

Default: [][]
List of values: 'default_parameters', 'max_num_iterations', 'pose_ref_sub_sampling', 'rel_sampling_distance'"default_parameters", "max_num_iterations", "pose_ref_sub_sampling", "rel_sampling_distance"

GenParamValuegenParamValuegen_param_value (input_control) number-array → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[int, str, float]]Htuple (double / Hlong / char*)

Values of the generic parameters that can be adjusted for the global 3D object model registration.

Default: [][]
Suggested values: 0.03, 0.05, 0.07, 0.1, 0.25, 0.5, 1, 2, 5, 10, 20, 'fast', 'accurate'0.03, 0.05, 0.07, 0.1, 0.25, 0.5, 1, 2, 5, 10, 20, "fast", "accurate"

HomMats3DOuthomMats3DOuthom_mats_3dout (output_control) hom_mat3d-array → (real / integer)HTuple (double / Hlong)HHomMat3D, HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

Resulting Transformations.

Scoresscoresscores (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Number of overlapping neighbors for each 3D object model.

Result🔗

register_object_model_3d_globalRegisterObjectModel3dGlobal returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_object_model_3dReadObjectModel3d, xyz_to_object_model_3dXyzToObjectModel3d, register_object_model_3d_pairRegisterObjectModel3dPair, gen_object_model_3d_from_pointsGenObjectModel3dFromPoints

Possible successors

affine_trans_object_model_3dAffineTransObjectModel3d, union_object_model_3dUnionObjectModel3d, sample_object_model_3dSampleObjectModel3d, triangulate_object_model_3dTriangulateObjectModel3d

See also

register_object_model_3d_pairRegisterObjectModel3dPair, find_surface_modelFindSurfaceModel, refine_surface_model_poseRefineSurfaceModelPose

Module🔗

3D Metrology