register_object_model_3d_globalT_register_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobal (Operator)

Name

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

Signature

register_object_model_3d_global( : : ObjectModels3D, HomMats3D, From, To, GenParamName, GenParamValue : HomMats3DOut, Scores)

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)

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 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 void HOperatorSet.RegisterObjectModel3dGlobal(HTuple objectModels3D, HTuple homMats3D, HTuple from, HTuple to, HTuple genParamName, HTuple genParamValue, out HTuple homMats3DOut, out HTuple scores)

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_globalregister_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobal 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 ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3D 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 HomMats3DOutHomMats3DOutHomMats3DOutHomMats3DOuthomMats3DOut describes a transformation that can be applied with affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3dAffineTransObjectModel3d to the input 3D object models to transform all in a common reference frame. ScoresScoresScoresScoresscores 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 HomMats3DHomMats3DHomMats3DHomMats3DhomMats3D are available, which is controlled by the parameters FromFromFromFromfrom and ToToToToto:

First, if FromFromFromFromfrom is set to 'global'"global""global""global""global", the parameter HomMats3DHomMats3DHomMats3DHomMats3DhomMats3D must contain a rigid transformation with 12 entries for each 3D object model in ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3D that describes its position in relation to a common global reference frame. In this case, ToToToToto 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 FromFromFromFromfrom is set to 'previous'"previous""previous""previous""previous", the parameter HomMats3DHomMats3DHomMats3DHomMats3DhomMats3D must contain a rigid transformation for each subsequent pair of 3D object models in ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3D (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_pairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPairRegisterObjectModel3dPair). ToToToToto 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 HomMats3DHomMats3DHomMats3DHomMats3DhomMats3D by setting FromFromFromFromfrom and ToToToToto 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 FromFromFromFromfrom into the coordinate system of the 3D object model with the corresponding index that is specified in ToToToToto. In this case, HomMats3DHomMats3DHomMats3DHomMats3DhomMats3D 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 ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3D 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 GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue:

'default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters":

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

Possible values: 'fast'"fast""fast""fast""fast", 'accurate'"accurate""accurate""accurate""accurate"

Default value: 'accurate'"accurate""accurate""accurate""accurate"

'rel_sampling_distance'"rel_sampling_distance""rel_sampling_distance""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.03, 0.05, 0.07

Default value: 0.05 Assertion: 0 < 'rel_sampling_distance'"rel_sampling_distance""rel_sampling_distance""rel_sampling_distance""rel_sampling_distance" < 1

'pose_ref_sub_sampling'"pose_ref_sub_sampling""pose_ref_sub_sampling""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: 1, 2, 20

Default value: 2 Assertion: 'pose_ref_sub_sampling'"pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling" > 0

'max_num_iterations'"max_num_iterations""max_num_iterations""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.

Possible values: 1, 2, 2

Default value: 2

Execution Information

This operator supports cancelling timeouts and interrupts.

Parameters

ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3D (input_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handles of several 3D object models.

HomMats3DHomMats3DHomMats3DHomMats3DhomMats3D (input_control)  hom_mat3d-array HHomMat3D, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Approximate relative transformations between the 3D object models.

FromFromFromFromfrom (input_control)  number(-array) HTupleHTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Type of interpretation for the transformations.

Default value: 'global' "global" "global" "global" "global"

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

ToToToToto (input_control)  number(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: []

List of values: 0, 1, 2, 3, 4

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string-array HTupleHTupleHtuple (string) (string) (HString) (char*)

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

Default value: []

List of values: 'default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters", 'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations", 'pose_ref_sub_sampling'"pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling", 'rel_sampling_distance'"rel_sampling_distance""rel_sampling_distance""rel_sampling_distance""rel_sampling_distance"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  number-array HTupleHTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

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

Default value: []

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

HomMats3DOutHomMats3DOutHomMats3DOutHomMats3DOuthomMats3DOut (output_control)  hom_mat3d-array HHomMat3D, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Resulting Transformations.

ScoresScoresScoresScoresscores (output_control)  number-array HTupleHTupleHtuple (real) (double) (double) (double)

Number of overlapping neighbors for each 3D object model.

Result

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

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3d, register_object_model_3d_pairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPairRegisterObjectModel3dPair, gen_object_model_3d_from_pointsgen_object_model_3d_from_pointsGenObjectModel3dFromPointsGenObjectModel3dFromPointsGenObjectModel3dFromPoints

Possible Successors

affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3dAffineTransObjectModel3d, union_object_model_3dunion_object_model_3dUnionObjectModel3dUnionObjectModel3dUnionObjectModel3d, sample_object_model_3dsample_object_model_3dSampleObjectModel3dSampleObjectModel3dSampleObjectModel3d, triangulate_object_model_3dtriangulate_object_model_3dTriangulateObjectModel3dTriangulateObjectModel3dTriangulateObjectModel3d

See also

register_object_model_3d_pairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPairRegisterObjectModel3dPair, find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel, refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPose

Module

3D Metrology