ClassesClassesClassesClasses | | | | Operators

register_object_model_3d_pairT_register_object_model_3d_pairRegisterObjectModel3dPairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPair (Operator)

Name

register_object_model_3d_pairT_register_object_model_3d_pairRegisterObjectModel3dPairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPair — Search for a transformation between two 3D object models.

Signature

register_object_model_3d_pair( : : ObjectModel3D1, ObjectModel3D2, Method, GenParamName, GenParamValue : Pose, Score)

Herror T_register_object_model_3d_pair(const Htuple ObjectModel3D1, const Htuple ObjectModel3D2, const Htuple Method, const Htuple GenParamName, const Htuple GenParamValue, Htuple* Pose, Htuple* Score)

Herror register_object_model_3d_pair(const HTuple& ObjectModel3D1, const HTuple& ObjectModel3D2, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Pose, HTuple* Score)

HTuple HObjectModel3D::RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score) const

void RegisterObjectModel3dPair(const HTuple& ObjectModel3D1, const HTuple& ObjectModel3D2, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Pose, HTuple* Score)

HPose HObjectModel3D::RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score) const

HPose HObjectModel3D::RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const HString& Method, const HString& GenParamName, double GenParamValue, HTuple* Score) const

HPose HObjectModel3D::RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const char* Method, const char* GenParamName, double GenParamValue, HTuple* Score) const

void HOperatorSetX.RegisterObjectModel3dPair(
[in] VARIANT ObjectModel3D1, [in] VARIANT ObjectModel3D2, [in] VARIANT Method, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* Pose, [out] VARIANT* Score)

VARIANT HObjectModel3DX.RegisterObjectModel3dPair(
[in] IHObjectModel3DX* ObjectModel3D2, [in] BSTR Method, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* Score)

static void HOperatorSet.RegisterObjectModel3dPair(HTuple objectModel3D1, HTuple objectModel3D2, HTuple method, HTuple genParamName, HTuple genParamValue, out HTuple pose, out HTuple score)

HPose HObjectModel3D.RegisterObjectModel3dPair(HObjectModel3D objectModel3D2, string method, HTuple genParamName, HTuple genParamValue, out HTuple score)

HPose HObjectModel3D.RegisterObjectModel3dPair(HObjectModel3D objectModel3D2, string method, string genParamName, double genParamValue, out HTuple score)

Description

register_object_model_3d_pairregister_object_model_3d_pairRegisterObjectModel3dPairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPair searches for a transformation between two 3D object models having an optimal alignment. This process is called registration. The transformation that is returned in PosePosePosePosePosepose can be used to transform ObjectModel3D1ObjectModel3D1ObjectModel3D1ObjectModel3D1ObjectModel3D1objectModel3D1 to the reference frame of the second object ObjectModel3D2ObjectModel3D2ObjectModel3D2ObjectModel3D2ObjectModel3D2objectModel3D2. ScoreScoreScoreScoreScorescore returns the ratio of the overlapping parts to the not overlapping parts of the two 3D object models. If the two objects are not overlapping, no pose is returned. The parameter MethodMethodMethodMethodMethodmethod decides if the initial relative position is calculated by 'matching'"matching""matching""matching""matching""matching" or if only the pose refinement is performed in relation to the then assumed common global reference frame, which can be selected directly with 'icp'"icp""icp""icp""icp""icp".

The matching process and the following refinement can be controlled using the following name-value pairs in GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue:

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

To allow an easy control over the parameters, three different sets of parameters are available. Selecting the 'fast'"fast""fast""fast""fast""fast" parameter set allows a shorter calculation time. 'accurate'"accurate""accurate""accurate""accurate""accurate" will give more accurate results. 'robust'"robust""robust""robust""robust""robust" additionally improves the quality of the resulting ScoreScoreScoreScoreScorescore at the cost of calculation time.

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

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

'rel_sampling_distance'"rel_sampling_distance""rel_sampling_distance""rel_sampling_distance""rel_sampling_distance""rel_sampling_distance":

This parameter controls the relative sampling rate of the 3D object models that is used to represent the surfaces for the computation. This value is relative to the diameter of the respective object and defines the minimal distance between two sampled points. A higher value will lead to faster and a lower value to more accurate results. This parameter can also be set for each object independently by using 'rel_sampling_distance_obj1'"rel_sampling_distance_obj1""rel_sampling_distance_obj1""rel_sampling_distance_obj1""rel_sampling_distance_obj1""rel_sampling_distance_obj1" and 'rel_sampling_distance_obj2'"rel_sampling_distance_obj2""rel_sampling_distance_obj2""rel_sampling_distance_obj2""rel_sampling_distance_obj2""rel_sampling_distance_obj2".

Possible values: 0.03, 0.05, 0.07

Default value: 0.05

'key_point_fraction'"key_point_fraction""key_point_fraction""key_point_fraction""key_point_fraction""key_point_fraction":

This parameter controls the ratio of sampled points that are considered as key points for the matching process. The number is relative to the sampled points of the model. Reducing this ratio speeds up the process, whereas increasing leads to more robust results. This parameter can be also set for each object independently by using 'key_point_fraction_obj1'"key_point_fraction_obj1""key_point_fraction_obj1""key_point_fraction_obj1""key_point_fraction_obj1""key_point_fraction_obj1" and 'key_point_fraction_obj2'"key_point_fraction_obj2""key_point_fraction_obj2""key_point_fraction_obj2""key_point_fraction_obj2""key_point_fraction_obj2".

Possible values: 0.2, 0.3, 0.4

Default value: 0.3

'pose_ref_num_steps'"pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps":

The number of iterative steps used for the pose refinement.

Possible values: 5, 7, 10

Default value: 5

'pose_ref_sub_sampling'"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. This parameter is only relevant for the smaller of the two objects.

Possible values: 1, 2, 20

Default value: 2

'pose_ref_dist_threshold_rel'"pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel":

Maximum distance that two faces might have to be considered as potentially overlapping. This value is relative to the diameter of the larger object.

Possible values: 0.05, 0.1, 0.15

Default value: 0.1

'model_invert_normals'"model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals":

Invert the normals of the smaller object, if its normals are inverted relative to the other object.

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

Default value: 'false'"false""false""false""false""false"

Parallelization

Parameters

ObjectModel3D1ObjectModel3D1ObjectModel3D1ObjectModel3D1ObjectModel3D1objectModel3D1 (input_control)  object_model_3d HObjectModel3D, HTupleHTupleHObjectModel3D, HTupleHObjectModel3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the first 3D object model.

ObjectModel3D2ObjectModel3D2ObjectModel3D2ObjectModel3D2ObjectModel3D2objectModel3D2 (input_control)  object_model_3d HObjectModel3D, HTupleHTupleHObjectModel3D, HTupleHObjectModel3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the second 3D object model.

MethodMethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Method for the registration.

Default value: 'matching' "matching" "matching" "matching" "matching" "matching"

List of values: 'icp'"icp""icp""icp""icp""icp", 'matching'"matching""matching""matching""matching""matching"

GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Names of the generic parameters.

Default value: []

List of values: 'default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters""default_parameters", 'key_point_fraction'"key_point_fraction""key_point_fraction""key_point_fraction""key_point_fraction""key_point_fraction", 'key_point_fraction_obj1'"key_point_fraction_obj1""key_point_fraction_obj1""key_point_fraction_obj1""key_point_fraction_obj1""key_point_fraction_obj1", 'key_point_fraction_obj2'"key_point_fraction_obj2""key_point_fraction_obj2""key_point_fraction_obj2""key_point_fraction_obj2""key_point_fraction_obj2", 'model_invert_normals'"model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals", 'pose_ref_dist_threshold_rel'"pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel", 'pose_ref_num_steps'"pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps", 'pose_ref_sub_sampling'"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""rel_sampling_distance", 'rel_sampling_distance_obj1'"rel_sampling_distance_obj1""rel_sampling_distance_obj1""rel_sampling_distance_obj1""rel_sampling_distance_obj1""rel_sampling_distance_obj1", 'rel_sampling_distance_obj2'"rel_sampling_distance_obj2""rel_sampling_distance_obj2""rel_sampling_distance_obj2""rel_sampling_distance_obj2""rel_sampling_distance_obj2"

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*) (double / Hlong / BSTR) (double / Hlong / char*)

Values of the generic parameters.

Default value: []

Suggested values: 'fast'"fast""fast""fast""fast""fast", 'accurate'"accurate""accurate""accurate""accurate""accurate", 'robust'"robust""robust""robust""robust""robust", 0.1, 0.25, 0.5, 1, 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

PosePosePosePosePosepose (output_control)  pose HPose, HTupleHTupleHTupleHPoseX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Pose to transform ObjectModel3D1ObjectModel3D1ObjectModel3D1ObjectModel3D1ObjectModel3D1objectModel3D1 in the reference frame of ObjectModel3D2ObjectModel3D2ObjectModel3D2ObjectModel3D2ObjectModel3D2objectModel3D2.

ScoreScoreScoreScoreScorescore (output_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Overlapping of the two 3D object models.

Example (HDevelop)

* Generate two boxes
gen_box_object_model_3d ([0,0,0,0,0,0,0],3,2,1, ObjectModel3D1)
gen_box_object_model_3d ([0,0,0.5,15,0,0,0],3,2,1, ObjectModel3D2)
* Match them
register_object_model_3d_pair (ObjectModel3D1, ObjectModel3D2, 'matching',\
                              [], [], Pose, Score)

Result

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

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dread_object_model_3dReadObjectModel3dReadObjectModel3d, gen_object_model_3d_from_pointsgen_object_model_3d_from_pointsGenObjectModel3dFromPointsgen_object_model_3d_from_pointsGenObjectModel3dFromPointsGenObjectModel3dFromPoints, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3d

Possible Successors

register_object_model_3d_globalregister_object_model_3d_globalRegisterObjectModel3dGlobalregister_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobal, affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3d, union_object_model_3dunion_object_model_3dUnionObjectModel3dunion_object_model_3dUnionObjectModel3dUnionObjectModel3d

See also

register_object_model_3d_globalregister_object_model_3d_globalRegisterObjectModel3dGlobalregister_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobal, find_surface_modelfind_surface_modelFindSurfaceModelfind_surface_modelFindSurfaceModelFindSurfaceModel

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators