create_deformable_surface_modelT_create_deformable_surface_modelCreateDeformableSurfaceModelCreateDeformableSurfaceModelcreate_deformable_surface_model (算子)
名称
create_deformable_surface_modelT_create_deformable_surface_modelCreateDeformableSurfaceModelCreateDeformableSurfaceModelcreate_deformable_surface_model — 创建执行基于可变形表面的匹配所需的数据结构。
签名
void CreateDeformableSurfaceModel(const HTuple& ObjectModel3D, const HTuple& RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DeformableSurfaceModel)
HDeformableSurfaceModel HObjectModel3D::CreateDeformableSurfaceModel(double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const
HDeformableSurfaceModel HObjectModel3D::CreateDeformableSurfaceModel(double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue) const
HDeformableSurfaceModel HObjectModel3D::CreateDeformableSurfaceModel(double RelSamplingDistance, const char* GenParamName, const char* GenParamValue) const
HDeformableSurfaceModel HObjectModel3D::CreateDeformableSurfaceModel(double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue) const
(
Windows only)
void HDeformableSurfaceModel::HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableSurfaceModel::HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue)
void HDeformableSurfaceModel::HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const char* GenParamName, const char* GenParamValue)
void HDeformableSurfaceModel::HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue)
(
Windows only)
void HDeformableSurfaceModel::CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableSurfaceModel::CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue)
void HDeformableSurfaceModel::CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const char* GenParamName, const char* GenParamValue)
void HDeformableSurfaceModel::CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue)
(
Windows only)
static void HOperatorSet.CreateDeformableSurfaceModel(HTuple objectModel3D, HTuple relSamplingDistance, HTuple genParamName, HTuple genParamValue, out HTuple deformableSurfaceModel)
HDeformableSurfaceModel HObjectModel3D.CreateDeformableSurfaceModel(double relSamplingDistance, HTuple genParamName, HTuple genParamValue)
HDeformableSurfaceModel HObjectModel3D.CreateDeformableSurfaceModel(double relSamplingDistance, string genParamName, string genParamValue)
public HDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HTuple genParamName, HTuple genParamValue)
public HDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, string genParamName, string genParamValue)
void HDeformableSurfaceModel.CreateDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HTuple genParamName, HTuple genParamValue)
void HDeformableSurfaceModel.CreateDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, string genParamName, string genParamValue)
描述
算子 create_deformable_surface_modelcreate_deformable_surface_modelCreateDeformableSurfaceModelCreateDeformableSurfaceModelCreateDeformableSurfaceModelcreate_deformable_surface_model creates a model for
deformable surface-based matching for the 3D object stored in the
3D object model ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d.
The 3D object model can, for example, have been read previously from a file
by using read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3dread_object_model_3d or it can have been created by using
xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3dxyz_to_object_model_3d。The created surface model is returned in DeformableSurfaceModelDeformableSurfaceModelDeformableSurfaceModelDeformableSurfaceModeldeformableSurfaceModeldeformable_surface_model。
The creation of the deformable surface model requires that the 3D object model
contains points and normals. The following combinations are possible:
Note that the direction and orientation (inward or outward) of the normals
of the model are important for matching.
The deformable surface model is created by sampling the 3D object model with
a certain distance.
The sampling distance must be specified in the parameter
RelSamplingDistanceRelSamplingDistanceRelSamplingDistanceRelSamplingDistancerelSamplingDistancerel_sampling_distance and is parametrized relative to the diameter
of the axis-parallel bounding box of the 3D object model.
For example, if RelSamplingDistanceRelSamplingDistanceRelSamplingDistanceRelSamplingDistancerelSamplingDistancerel_sampling_distance is set to 0.05 and
the diameter of ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d is 10 cm, the points
sampled from the object's surface will be approximately 5 mm
apart.
The sampled points can be obtained with the operator
get_deformable_surface_model_paramget_deformable_surface_model_paramGetDeformableSurfaceModelParamGetDeformableSurfaceModelParamGetDeformableSurfaceModelParamget_deformable_surface_model_param using the value
'sampled_model'"sampled_model""sampled_model""sampled_model""sampled_model""sampled_model".
Note that outlier points in the object model should be avoided, as they would
corrupt the diameter.
Reducing RelSamplingDistanceRelSamplingDistanceRelSamplingDistanceRelSamplingDistancerelSamplingDistancerel_sampling_distance leads to more points, and in turn
to a more stable but slower matching. Increasing
RelSamplingDistanceRelSamplingDistanceRelSamplingDistanceRelSamplingDistancerelSamplingDistancerel_sampling_distance leads to less points, and in turn to a less
stable but faster matching.
By default, deformable surface models created with
create_deformable_surface_modelcreate_deformable_surface_modelCreateDeformableSurfaceModelCreateDeformableSurfaceModelCreateDeformableSurfaceModelcreate_deformable_surface_model can handle a moderate amount of
deformation. The operator add_deformable_surface_model_sampleadd_deformable_surface_model_sampleAddDeformableSurfaceModelSampleAddDeformableSurfaceModelSampleAddDeformableSurfaceModelSampleadd_deformable_surface_model_sample
can be used to add additional training samples, thus expanding the
range of possible deformations.
The amount of deformation that can be found can also be controlled with the
generic parameters 'scale_min'"scale_min""scale_min""scale_min""scale_min""scale_min", 'scale_max'"scale_max""scale_max""scale_max""scale_max""scale_max" and
'bending_max'"bending_max""bending_max""bending_max""bending_max""bending_max" (see below).
The generic parameter pair GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
is used to set additional parameters for the model generation.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name contains the tuple of parameter names that shall be
set and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value contains the corresponding values.
The following values are possible for GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name:
- 'model_invert_normals'"model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals":
-
Invert the orientation of the surface normals of the model.
The normal orientation needs to be known for the model generation.
If both the model and the scene are acquired with the same setup,
the normals will already point in the same direction.
If the model was loaded from a CAD file, the normals might point
into the opposite direction. If you experience the effect that the
model is found on the 'outside' of the scene surface and the
model was created from a CAD file, try to set this parameter to
'true'"true""true""true""true""true".
Also, make sure that the normals in the CAD file all point either
outward or inward, i.e., are oriented consistently.
Possible values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
默认值: 'false'"false""false""false""false""false"
- 'scale_min'"scale_min""scale_min""scale_min""scale_min""scale_min" and 'scale_max'"scale_max""scale_max""scale_max""scale_max""scale_max":
-
The minimum and maximum allowed scaling of the model.
Note that if you set one of the two parameters, the other one must
be set too.
建议值: 0.8, 1, 1.2
默认值: No scaling
Assertion: 0 < 'scale_min'"scale_min""scale_min""scale_min""scale_min""scale_min" < 'scale_max'"scale_max""scale_max""scale_max""scale_max""scale_max"
- 'bending_max'"bending_max""bending_max""bending_max""bending_max""bending_max":
-
Controls the maximum automatic deformation of the model.
The model is deformed automatically by bending it with an angle up
to the value of 'bending_max'"bending_max""bending_max""bending_max""bending_max""bending_max". This allows for deformations to be found
that are within this bending range.
The angle is passed in degrees.
建议值: 5, 10, 30
默认值: 20
Assertion: 0 <= 'bending_max'"bending_max""bending_max""bending_max""bending_max""bending_max" < 90
- 'stiffness'"stiffness""stiffness""stiffness""stiffness""stiffness":
-
Control the stiffness of the model when performing the
refinement.
Larger values of this parameter lead to a more stiff model that can
be less deformed. Smaller values lead to a less stiff model that
allows more deformation.
建议值: 0.2, 0.5, 0.8
默认值: 0.5
Assertion: 0 < 'stiffness'"stiffness""stiffness""stiffness""stiffness""stiffness" <= 1
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在内部数据级别上自动并行化。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
此算子支持取消超时和中断。
参数
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (输入控制) object_model_3d → HObjectModel3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
3D 对象模型的句柄。
RelSamplingDistanceRelSamplingDistanceRelSamplingDistanceRelSamplingDistancerelSamplingDistancerel_sampling_distance (输入控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Sampling distance relative to the object's diameter
默认值:
0.05
建议值:
0.1, 0.05, 0.03, 0.02, 0.01
限制:
0 < RelSamplingDistance < 1
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) attribute.name(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
通用参数的名称。
默认值:
[]
建议值:
'model_invert_normals'"model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals""model_invert_normals", 'scale_min'"scale_min""scale_min""scale_min""scale_min""scale_min", 'scale_max'"scale_max""scale_max""scale_max""scale_max""scale_max", 'bending_max'"bending_max""bending_max""bending_max""bending_max""bending_max", 'stiffness'"stiffness""stiffness""stiffness""stiffness""stiffness"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制) attribute.value(-array) → HTupleMaybeSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)
通用参数的值。
默认值:
[]
建议值:
'true'"true""true""true""true""true", 'false'"false""false""false""false""false", 1, 0.9, 1.1, 5, 10, 20, 30, 0.05, 0.1, 0.2
DeformableSurfaceModelDeformableSurfaceModelDeformableSurfaceModelDeformableSurfaceModeldeformableSurfaceModeldeformable_surface_model (输出控制) deformable_surface_model → HDeformableSurfaceModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the deformable surface model.
结果
create_deformable_surface_modelcreate_deformable_surface_modelCreateDeformableSurfaceModelCreateDeformableSurfaceModelCreateDeformableSurfaceModelcreate_deformable_surface_model 在所有参数正确时返回 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,
get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParamsget_object_model_3d_params
可能的后继
add_deformable_surface_model_sampleadd_deformable_surface_model_sampleAddDeformableSurfaceModelSampleAddDeformableSurfaceModelSampleAddDeformableSurfaceModelSampleadd_deformable_surface_model_sample,
add_deformable_surface_model_reference_pointadd_deformable_surface_model_reference_pointAddDeformableSurfaceModelReferencePointAddDeformableSurfaceModelReferencePointAddDeformableSurfaceModelReferencePointadd_deformable_surface_model_reference_point,
find_deformable_surface_modelfind_deformable_surface_modelFindDeformableSurfaceModelFindDeformableSurfaceModelFindDeformableSurfaceModelfind_deformable_surface_model,
refine_deformable_surface_modelrefine_deformable_surface_modelRefineDeformableSurfaceModelRefineDeformableSurfaceModelRefineDeformableSurfaceModelrefine_deformable_surface_model,
get_deformable_surface_model_paramget_deformable_surface_model_paramGetDeformableSurfaceModelParamGetDeformableSurfaceModelParamGetDeformableSurfaceModelParamget_deformable_surface_model_param,
write_deformable_surface_modelwrite_deformable_surface_modelWriteDeformableSurfaceModelWriteDeformableSurfaceModelWriteDeformableSurfaceModelwrite_deformable_surface_model,
clear_deformable_surface_modelclear_deformable_surface_modelClearDeformableSurfaceModelClearDeformableSurfaceModelClearDeformableSurfaceModelclear_deformable_surface_model
替代
read_deformable_surface_modelread_deformable_surface_modelReadDeformableSurfaceModelReadDeformableSurfaceModelReadDeformableSurfaceModelread_deformable_surface_model
另见
find_deformable_surface_modelfind_deformable_surface_modelFindDeformableSurfaceModelFindDeformableSurfaceModelFindDeformableSurfaceModelfind_deformable_surface_model,
refine_deformable_surface_modelrefine_deformable_surface_modelRefineDeformableSurfaceModelRefineDeformableSurfaceModelRefineDeformableSurfaceModelrefine_deformable_surface_model,
read_deformable_surface_modelread_deformable_surface_modelReadDeformableSurfaceModelReadDeformableSurfaceModelReadDeformableSurfaceModelread_deformable_surface_model,
add_deformable_surface_model_sampleadd_deformable_surface_model_sampleAddDeformableSurfaceModelSampleAddDeformableSurfaceModelSampleAddDeformableSurfaceModelSampleadd_deformable_surface_model_sample,
add_deformable_surface_model_reference_pointadd_deformable_surface_model_reference_pointAddDeformableSurfaceModelReferencePointAddDeformableSurfaceModelReferencePointAddDeformableSurfaceModelReferencePointadd_deformable_surface_model_reference_point,
write_deformable_surface_modelwrite_deformable_surface_modelWriteDeformableSurfaceModelWriteDeformableSurfaceModelWriteDeformableSurfaceModelwrite_deformable_surface_model,
clear_deformable_surface_modelclear_deformable_surface_modelClearDeformableSurfaceModelClearDeformableSurfaceModelClearDeformableSurfaceModelclear_deformable_surface_model
参考文献
Bertram Drost, Slobodan Ilic: “Graph-Based Deformable
3D Object Matching.” Proceedings of the 37th German Conference
on Pattern Recognition, pp. 222-233, 2015.
模块
三维计量