register_object_model_3d_globalT_register_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalregister_object_model_3d_global (算子)
名称
register_object_model_3d_globalT_register_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalregister_object_model_3d_global — 基于重叠改进三维对象模型之间的相对变换。
签名
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)
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]]
描述
register_object_model_3d_globalregister_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalregister_object_model_3d_global 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 ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3Dobject_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 HomMats3DOutHomMats3DOutHomMats3DOutHomMats3DOuthomMats3DOuthom_mats_3dout describes a transformation that
can be applied with affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3dAffineTransObjectModel3daffine_trans_object_model_3d to the input
3D object models to transform all in a common reference frame.
ScoresScoresScoresScoresscoresscores 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
HomMats3DHomMats3DHomMats3DHomMats3DhomMats3Dhom_mats_3d are available, which is controlled by the parameters
FromFromFromFromfromfrom and ToToToTototo:
First, if FromFromFromFromfromfrom is set to 'global'"global""global""global""global""global", the
parameter HomMats3DHomMats3DHomMats3DHomMats3DhomMats3Dhom_mats_3d must contain a rigid transformation with
12 entries for each 3D object model in ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3Dobject_models_3d that
describes its position in relation to a common global reference frame. In
this case, ToToToTototo 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 FromFromFromFromfromfrom is set to
'previous'"previous""previous""previous""previous""previous", the parameter HomMats3DHomMats3DHomMats3DHomMats3DhomMats3Dhom_mats_3d must contain a
rigid transformation for each subsequent pair of 3D object models in
ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3Dobject_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_pairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPairRegisterObjectModel3dPairregister_object_model_3d_pair). ToToToTototo 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 HomMats3DHomMats3DHomMats3DHomMats3DhomMats3Dhom_mats_3d
by setting FromFromFromFromfromfrom and ToToToTototo 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
FromFromFromFromfromfrom into the coordinate system of the 3D object model with the
corresponding index that is specified in ToToToTototo.
In this case, HomMats3DHomMats3DHomMats3DHomMats3DhomMats3Dhom_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 ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3Dobject_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
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value:
- 'default_parameters'"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""fast" and an 'accurate'"accurate""accurate""accurate""accurate""accurate" set
of parameters.
值列表:
'fast'"fast""fast""fast""fast""fast", 'accurate'"accurate""accurate""accurate""accurate""accurate".
默认值:
'accurate'"accurate""accurate""accurate""accurate""accurate".
- 'rel_sampling_distance'"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.
建议值:
0.03, 0.05, 0.07.
默认值:
0.05 ('default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters""default_parameters" =
'accurate'"accurate""accurate""accurate""accurate""accurate"),
0.07 ('default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters""default_parameters" = 'fast'"fast""fast""fast""fast""fast").
限制:
0 < 'rel_sampling_distance'"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""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.
建议值:
1, 2, 20.
默认值:
2 ('default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters""default_parameters" =
'accurate'"accurate""accurate""accurate""accurate""accurate"),
10 ('default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters""default_parameters" = 'fast'"fast""fast""fast""fast""fast").
限制:
'pose_ref_sub_sampling'"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""max_num_iterations":
-
Number of iterations applied
to adjust the initial alignment. The better the initial alignment is,
the less iterations are necessary.
建议值:
1, 3, 10.
默认值:
3.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在内部数据级别上自动并行化。
此算子支持取消超时和中断。
参数
ObjectModels3DObjectModels3DObjectModels3DObjectModels3DobjectModels3Dobject_models_3d (输入控制) object_model_3d(-array) → HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handles of several 3D object models.
HomMats3DHomMats3DHomMats3DHomMats3DhomMats3Dhom_mats_3d (输入控制) hom_mat3d-array → HHomMat3D, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Approximate relative transformations between
the 3D object models.
FromFromFromFromfromfrom (输入控制) number(-array) → HTupleMaybeSequence[Union[int, str]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Type of interpretation for the transformations.
默认值:
'global'
"global"
"global"
"global"
"global"
"global"
值列表:
0, 1, 2, 3, 4, 'global'"global""global""global""global""global", 'previous'"previous""previous""previous""previous""previous"
ToToToTototo (输入控制) number(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Target indices of the transformations if
FromFromFromFromfromfrom specifies the source indices, otherwise
the parameter must be empty.
默认值:
[]
值列表:
0, 1, 2, 3, 4
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) string-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Names of the generic parameters that can be adjusted
for the global 3D object model registration.
默认值:
[]
值列表:
'default_parameters'"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""max_num_iterations", '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"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制) number-array → HTupleSequence[Union[int, str, float]]HTupleHtuple (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.
默认值:
[]
建议值:
0.03, 0.05, 0.07, 0.1, 0.25, 0.5, 1, 2, 5, 10, 20, 'fast'"fast""fast""fast""fast""fast", 'accurate'"accurate""accurate""accurate""accurate""accurate"
HomMats3DOutHomMats3DOutHomMats3DOutHomMats3DOuthomMats3DOuthom_mats_3dout (输出控制) hom_mat3d-array → HHomMat3D, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Resulting Transformations.
ScoresScoresScoresScoresscoresscores (输出控制) number-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Number of overlapping neighbors for each
3D object model.
结果
register_object_model_3d_globalregister_object_model_3d_globalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalRegisterObjectModel3dGlobalregister_object_model_3d_global 在所有参数正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3dread_object_model_3d,
xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3dxyz_to_object_model_3d,
register_object_model_3d_pairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPairRegisterObjectModel3dPairregister_object_model_3d_pair,
gen_object_model_3d_from_pointsgen_object_model_3d_from_pointsGenObjectModel3dFromPointsGenObjectModel3dFromPointsGenObjectModel3dFromPointsgen_object_model_3d_from_points
可能的后继
affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3dAffineTransObjectModel3daffine_trans_object_model_3d,
union_object_model_3dunion_object_model_3dUnionObjectModel3dUnionObjectModel3dUnionObjectModel3dunion_object_model_3d,
sample_object_model_3dsample_object_model_3dSampleObjectModel3dSampleObjectModel3dSampleObjectModel3dsample_object_model_3d,
triangulate_object_model_3dtriangulate_object_model_3dTriangulateObjectModel3dTriangulateObjectModel3dTriangulateObjectModel3dtriangulate_object_model_3d
另见
register_object_model_3d_pairregister_object_model_3d_pairRegisterObjectModel3dPairRegisterObjectModel3dPairRegisterObjectModel3dPairregister_object_model_3d_pair,
find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModelfind_surface_model,
refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPoserefine_surface_model_pose
模块
三维计量