説明
create_deformable_surface_modelCreateDeformableSurfaceModelCreateDeformableSurfaceModelcreate_deformable_surface_modelT_create_deformable_surface_model — 可変形状サーフェスマッチングを行うために必要なデータ構造体を作
成する。
書式
create_deformable_surface_model( object_model_3d ObjectModel3D, real RelSamplingDistance, attribute.name GenParamName, attribute.value GenParamValue, out deformable_surface_model DeformableSurfaceModel )void CreateDeformableSurfaceModel( const HTuple& ObjectModel3D, const HTuple& RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DeformableSurfaceModel )static void HOperatorSet.CreateDeformableSurfaceModel( HTuple objectModel3D, HTuple relSamplingDistance, HTuple genParamName, HTuple genParamValue, out HTuple deformableSurfaceModel )def create_deformable_surface_model( object_model_3d: HHandle, rel_sampling_distance: float, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[str, float, int]] ) -> HHandle
Herror T_create_deformable_surface_model( const Htuple ObjectModel3D, const Htuple RelSamplingDistance, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DeformableSurfaceModel )
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)
public HDeformableSurfaceModel( HObjectModel3D objectModel3D, double relSamplingDistance, HTuple genParamName, HTuple genParamValue )
public HDeformableSurfaceModel( HObjectModel3D objectModel3D, double relSamplingDistance, string genParamName, string genParamValue )
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::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)
HDeformableSurfaceModel HObjectModel3D.CreateDeformableSurfaceModel( double relSamplingDistance, HTuple genParamName, HTuple genParamValue )
HDeformableSurfaceModel HObjectModel3D.CreateDeformableSurfaceModel( 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_modelCreateDeformableSurfaceModel は、3D オブジ
ェクトモデル ObjectModel3DobjectModel3Dobject_model_3d に格納される 3D オブジェクトから
可変形状サーフェスマッチングのモデルを作成します。
3D オブジェクトモデルは、前もって、read_object_model_3dReadObjectModel3d を使
用してファイルから読み取ったり、xyz_to_object_model_3dXyzToObjectModel3d
を使用して作成したりしておいてください。
作成されたサーフェスモデルは、DeformableSurfaceModeldeformableSurfaceModeldeformable_surface_model に返されま
す。
可変形状サーフェスモデルを作成するには、3D オブジェクトモデルに点と法
線が含まれている必要があります。以下の組み合わせが可能です。
マッチングでは、モデルの法線の方向(内側または外側)が重要である点
に注意してください。
可変形状サーフェスモデルは、3D オブジェクトモデルを一定距離でサンプリ
ングすることによって作成されます。
サンプリング距離はパラメーター RelSamplingDistancerelSamplingDistancerel_sampling_distance に指定
する必要があり、3D オブジェクトモデルの軸平行なバウンディングボックスの直径に
対してパラメーター化されます。
例えば、RelSamplingDistancerelSamplingDistancerel_sampling_distance が 0.05 に設定され、
ObjectModel3DobjectModel3Dobject_model_3d の直径が 10 cm である場合、オブジェクトの表
面からサンプリングされた点は、およそ 5 mm 間隔になります。
サンプリングされた点は、オペレーター
get_deformable_surface_model_paramGetDeformableSurfaceModelParam により、値
'sampled_model'"sampled_model" を使って取得できます。
オブジェクトモデル内の異常な点は、直径に悪影響を与えるので回避する
必要があります。
RelSamplingDistancerelSamplingDistancerel_sampling_distance を減らすと、点の数が増え、安定性が増
しますが、マッチング速度が遅くなります。
RelSamplingDistancerelSamplingDistancerel_sampling_distance を増やすと、点の数が減り、安定性が低
くなりますが、マッチング速度が速くなります。
(1) オリジナルの3Dモデル.
(2) RelSamplingDistancerelSamplingDistancerel_sampling_distance = 0.020.02 でサンプリングされた3Dモデル.
(3) RelSamplingDistancerelSamplingDistancerel_sampling_distance = 0.030.03.
(4) RelSamplingDistancerelSamplingDistancerel_sampling_distance = 0.050.05.
デフォルトでは、create_deformable_surface_modelCreateDeformableSurfaceModel を使用して
作成された可変形状サーフェスモデルは、中程度の変形を処理できます。オペ
レーター add_deformable_surface_model_sampleAddDeformableSurfaceModelSample を使用して、
追加のトレーニングサンプルを追加して、可能な変形の範囲を拡張できま
す。
検出できる変形量は、一般パラメーター 'scale_min'"scale_min"、
'scale_max'"scale_max"、および 'bending_max'"bending_max" を使用して制御
することもできます(以下を参照)。
汎用パラメーター GenParamNamegenParamNamegen_param_name と GenParamValuegenParamValuegen_param_value
のペアを使用して、モデル生成用の追加パラメーターを設定できます。
GenParamNamegenParamNamegen_param_name には設定するパラメーター名、
GenParamValuegenParamValuegen_param_value には対応する値が含まれています。
GenParamNamegenParamNamegen_param_nameには、以下の値が可能となります。
-
'model_invert_normals'"model_invert_normals":
モデルの表面法線の方向を反転します。
モデルを生成するためには、法線の方向を把握する必要があります。
モデルとシーンの両方を同じ設定で取得した場合、法線はすでに同じ方
向を向いています。
モデルを CAD ファイルからロードした場合、法線は反対方向を向い
ていることがあります。モデルがシーンの表面の外側で見つかり、CAD
ファイルから作成されていた場合は、このパラメーターを
'true'"true" に設定してみてください。
さらに、CAD ファイル内の法線がすべて外側か内側を向いているこ
と、つまり方向が揃っていることを確認してください。
値のリスト: 'false'"false"、'true'"true"
初期値: 'false'"false"
-
'scale_min'"scale_min" および 'scale_max'"scale_max":
モデルの最小および最大許容スケーリング。
2 つのパラメーターのうちの一方を設定した場合は、もう 1 つのパ
ラメーターも設定する必要があります。
推奨値: 0.80.8、11、1.21.2
初期値: スケーリングなし
制限: 00 < 'scale_min'"scale_min" < 'scale_max'"scale_max"
-
'bending_max'"bending_max":
モデルの最大自動変形量を制御します。
モデルは、'bending_max'"bending_max" の値の角度まで曲げることで、
自動的に変形されます。これにより、変形がこの屈曲範囲内で検出で
きるようになります。
角度は、度単位で渡されます。
推奨値: 55、1010、3030
初期値: 2020
制限: 00 <= 'bending_max'"bending_max" < 9090
-
'stiffness'"stiffness":
精密位置合わせ実行時のモデルの剛性を制御します。
このパラメーターの値が大きいほど、変形しにくく、より硬いモデル
になります。値が小さいほど、変形しやすく、より柔らかいモデルに
なります。
推奨値: 0.20.2、0.50.5、0.80.8
初期値: 0.50.5
制限: 00 < 'stiffness'"stiffness" <= 11
実行情報
実行情報
このオペレータはハンドルを返します。このハンドルタイプのインスタンスの状態は、特定のオペレータにおいては、入力パラメータとして使われている場合であっても変更されることがあります。
このオペレータは、タイムアウトと割り込みのキャンセルをサポートします。
パラメーター
ObjectModel3DobjectModel3Dobject_model_3d (input_control) object_model_3d → (handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)HHandleHtuple (handle)
3 次元オブジェクトモデルのハンドル
RelSamplingDistancerelSamplingDistancerel_sampling_distance (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)
オブジェクトの直径に対するサンプリング
距離
初期値: 0.050.05
推奨値: 0.1, 0.05, 0.03, 0.02, 0.010.1, 0.05, 0.03, 0.02, 0.01
制限: 0 < RelSamplingDistance < 1
GenParamNamegenParamNamegen_param_name (input_control) attribute.name(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)
汎用パラメーターの名前
初期値: [][]
推奨値: 'model_invert_normals', 'scale_min', 'scale_max', 'bending_max', 'stiffness'"model_invert_normals", "scale_min", "scale_max", "bending_max", "stiffness"
GenParamValuegenParamValuegen_param_value (input_control) attribute.value(-array) → (string / real / integer)HTuple (HString / double / Hlong)HTuple (string / double / int / long)MaybeSequence[Union[str, float, int]]Htuple (char* / double / Hlong)
汎用パラメーターの値
初期値: [][]
推奨値: 'true', 'false', 1, 0.9, 1.1, 5, 10, 20, 30, 0.05, 0.1, 0.2"true", "false", 1, 0.9, 1.1, 5, 10, 20, 30, 0.05, 0.1, 0.2
DeformableSurfaceModeldeformableSurfaceModeldeformable_surface_model (output_control) deformable_surface_model → (handle)HTuple (HHandle)HDeformableSurfaceModel, HTuple (IntPtr)HHandleHtuple (handle)
可変形状サーフェスモデルのハンドル
結果
create_deformable_surface_modelCreateDeformableSurfaceModel は、すべてのパラメーターが
正しい場合に 2 (H_MSG_TRUE) を返します。必要に応じて、例外が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
read_object_model_3dReadObjectModel3d, xyz_to_object_model_3dXyzToObjectModel3d, get_object_model_3d_paramsGetObjectModel3dParams
後処理の候補
add_deformable_surface_model_sampleAddDeformableSurfaceModelSample, add_deformable_surface_model_reference_pointAddDeformableSurfaceModelReferencePoint, find_deformable_surface_modelFindDeformableSurfaceModel, refine_deformable_surface_modelRefineDeformableSurfaceModel, get_deformable_surface_model_paramGetDeformableSurfaceModelParam, write_deformable_surface_modelWriteDeformableSurfaceModel, clear_deformable_surface_modelClearDeformableSurfaceModel
他の選択候補
read_deformable_surface_modelReadDeformableSurfaceModel
関連項目
find_deformable_surface_modelFindDeformableSurfaceModel, refine_deformable_surface_modelRefineDeformableSurfaceModel, read_deformable_surface_modelReadDeformableSurfaceModel, add_deformable_surface_model_sampleAddDeformableSurfaceModelSample, add_deformable_surface_model_reference_pointAddDeformableSurfaceModelReferencePoint, write_deformable_surface_modelWriteDeformableSurfaceModel, clear_deformable_surface_modelClearDeformableSurfaceModel
参考文献
Bertram Drost, Slobodan Ilic: ``Graph-Based Deformable
3D Object Matching.’’ Proceedings of the 37th German Conference
on Pattern Recognition, pp. 222-233, 2015.
モジュール
3D Metrology