説明
create_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModelcreate_local_deformable_modelT_create_local_deformable_model — 局所変形マッチングに使用する局所変形サーチモデルを生成する。
書式
create_local_deformable_model( image Template, integer NumLevels, angle.rad AngleStart, angle.rad AngleExtent, angle.rad AngleStep, number ScaleRMin, number ScaleRMax, number ScaleRStep, number ScaleCMin, number ScaleCMax, number ScaleCStep, string Optimization, string Metric, number Contrast, number MinContrast, string GenParamName, integer GenParamValue, out deformable_model ModelID )void CreateLocalDeformableModel( const HObject& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ModelID )static void HOperatorSet.CreateLocalDeformableModel( HObject template, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, HTuple scaleRMin, HTuple scaleRMax, HTuple scaleRStep, HTuple scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, HTuple metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue, out HTuple modelID )def create_local_deformable_model( template: HObject, num_levels: Union[int, str], angle_start: Sequence[float], angle_extent: Sequence[float], angle_step: Union[float, str], scale_rmin: float, scale_rmax: Sequence[float], scale_rstep: Union[float, str], scale_cmin: float, scale_cmax: Sequence[float], scale_cstep: Union[float, str], optimization: MaybeSequence[str], metric: str, contrast: Sequence[Union[int, str]], min_contrast: Union[int, str], gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]] ) -> HHandle
Herror T_create_local_deformable_model( const Hobject Template, const Htuple NumLevels, const Htuple AngleStart, const Htuple AngleExtent, const Htuple AngleStep, const Htuple ScaleRMin, const Htuple ScaleRMax, const Htuple ScaleRStep, const Htuple ScaleCMin, const Htuple ScaleCMax, const Htuple ScaleCStep, const Htuple Optimization, const Htuple Metric, const Htuple Contrast, const Htuple MinContrast, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ModelID )
void HDeformableModel::CreateLocalDeformableModel( const HImage& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue )
void HDeformableModel::CreateLocalDeformableModel( const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue )
void HDeformableModel::CreateLocalDeformableModel( const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue )
void HDeformableModel::CreateLocalDeformableModel( const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)
HDeformableModel HImage::CreateLocalDeformableModel( const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue ) const
HDeformableModel HImage::CreateLocalDeformableModel( Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue ) const
HDeformableModel HImage::CreateLocalDeformableModel( Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue ) const
HDeformableModel HImage::CreateLocalDeformableModel( Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue ) const (Windows only)
void HDeformableModel.CreateLocalDeformableModel( HImage template, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue )
void HDeformableModel.CreateLocalDeformableModel( HImage template, int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, HTuple contrast, int minContrast, HTuple genParamName, HTuple genParamValue )
HDeformableModel HImage.CreateLocalDeformableModel( HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue )
HDeformableModel HImage.CreateLocalDeformableModel( int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, HTuple contrast, int minContrast, HTuple genParamName, HTuple genParamValue )
説明
オペレーター create_local_deformable_modelCreateLocalDeformableModel は、
画像 Templatetemplatetemplateから局所変形
マッチングに使用される局所変形サーチモデルを作成します。
モデルの ROI は Templatetemplatetemplate の
ドメインとして渡されます。
局所変形マッチングは、局所的な変形によって歪んだオブジェクトの検出や、
変形度合いの推定、見つかったオブジェクトの画像領域の補正などを実施
できます。他のマッチング手法との違いについては、“Solution Guide I” の
‘2D Matching’の章を参照してください。
create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel で記述するように、
モデルの原点(参照点)はモデル画像 Templatetemplatetemplate のドメイン(領域)
の重心として定義されます。さらに、find_local_deformable_modelFindLocalDeformableModel
によって検索される画像の範囲としてTemplatetemplatetemplate のドメインを内包する
矩形が使用されます。
局所変形モデルの作成に使用するパラメーターについては、
create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel の説明を参照してください。
実際の局所変形に関するパラメーターは、find_local_deformable_modelFindLocalDeformableModel において
設定されます。
実行情報
実行情報
このオペレータはハンドルを返します。このハンドルタイプのインスタンスの状態は、特定のオペレータにおいては、入力パラメータとして使われている場合であっても変更されることがあります。
パラメーター
Templatetemplatetemplate (input_object) (multichannel-)image → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)
モデルを生成するために使用されるドメインを持つ入力画像
NumLevelsnumLevelsnum_levels (input_control) integer → (integer / string)HTuple (Hlong / HString)HTuple (int / long / string)Union[int, str]Htuple (Hlong / char*)
ピラミッドレベルの最大値
初期値: 'auto'"auto"
値のリスト: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 'auto'0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "auto"
AngleStartangleStartangle_start (input_control) angle.rad-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
このパラメーターは使用されていません
初期値: [][]
AngleExtentangleExtentangle_extent (input_control) angle.rad-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
このパラメーターは使用されていません
初期値: [][]
AngleStepangleStepangle_step (input_control) angle.rad → (real / string)HTuple (double / HString)HTuple (double / string)Union[float, str]Htuple (double / char*)
角度の刻み幅 (分解能)
初期値: 'auto'"auto"
推奨値: 'auto', 0.0175, 0.0349, 0.0524, 0.0698, 0.0873"auto", 0.0175, 0.0349, 0.0524, 0.0698, 0.0873
制限: AngleStep > 0 && AngleStep <= pi/16
ScaleRMinscaleRMinscale_rmin (input_control) number → (real)HTuple (double)HTuple (double)floatHtuple (double)
行方向の最小スケール
初期値: 1.01.0
推奨値: 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.5, 0.6, 0.7, 0.8, 0.9, 1.0
制限: ScaleRMin > 0
ScaleRMaxscaleRMaxscale_rmax (input_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
このパラメーターは使用されていません
初期値: [][]
ScaleRStepscaleRStepscale_rstep (input_control) number → (real / string)HTuple (double / HString)HTuple (double / string)Union[float, str]Htuple (double / char*)
行方向のスケールステップ長(分解能)
初期値: 'auto'"auto"
推奨値: 'auto', 0.01, 0.02, 0.05, 0.1, 0.15, 0.2"auto", 0.01, 0.02, 0.05, 0.1, 0.15, 0.2
制限: ScaleRStep >= 0
ScaleCMinscaleCMinscale_cmin (input_control) number → (real)HTuple (double)HTuple (double)floatHtuple (double)
列方向の最小スケール
初期値: 1.01.0
推奨値: 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.5, 0.6, 0.7, 0.8, 0.9, 1.0
制限: ScaleCMin > 0
ScaleCMaxscaleCMaxscale_cmax (input_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
このパラメーターは使用されていません
初期値: [][]
ScaleCStepscaleCStepscale_cstep (input_control) number → (real / string)HTuple (double / HString)HTuple (double / string)Union[float, str]Htuple (double / char*)
列方向のスケールステップ長(分解能)
初期値: 'auto'"auto"
推奨値: 'auto', 0.01, 0.02, 0.05, 0.1, 0.15, 0.2"auto", 0.01, 0.02, 0.05, 0.1, 0.15, 0.2
制限: ScaleCStep >= 0
Optimizationoptimizationoptimization (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)
モデル生成に使用する最適化種別
初期値: 'none'"none"
値のリスト: 'auto', 'none', 'point_reduction_high', 'point_reduction_low', 'point_reduction_medium'"auto", "none", "point_reduction_high", "point_reduction_low", "point_reduction_medium"
Metricmetricmetric (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)
マッチング基準
初期値: 'use_polarity'"use_polarity"
値のリスト: 'ignore_color_polarity', 'ignore_global_polarity', 'ignore_local_polarity', 'ignore_part_polarity', 'use_polarity'"ignore_color_polarity", "ignore_global_polarity", "ignore_local_polarity", "ignore_part_polarity", "use_polarity"
Contrastcontrastcontrast (input_control) number-array → (integer / string)HTuple (Hlong / HString)HTuple (int / long / string)Sequence[Union[int, str]]Htuple (Hlong / char*)
テンプレート画像にあるオブジェクトのコントラストに対する
しきい値またはヒステリシスしきい値
初期値: 'auto'"auto"
推奨値: 'auto', 10, 20, 30, 40, 60, 80, 100, 120, 140, 160"auto", 10, 20, 30, 40, 60, 80, 100, 120, 140, 160
MinContrastminContrastmin_contrast (input_control) number → (integer / string)HTuple (Hlong / HString)HTuple (int / long / string)Union[int, str]Htuple (Hlong / char*)
検索画像中の対象の最小コントラスト
初期値: 'auto'"auto"
推奨値: 'auto', 1, 2, 3, 5, 7, 10, 20, 30, 40"auto", 1, 2, 3, 5, 7, 10, 20, 30, 40
制限: MinContrast < Contrast
GenParamNamegenParamNamegen_param_name (input_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)
一般パラメーター名
初期値: [][]
値のリスト: [], 'min_size', 'part_size'[], "min_size", "part_size"
GenParamValuegenParamValuegen_param_value (input_control) integer-array → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[int, float, str]]Htuple (Hlong / double / char*)
一般パラメーター値
初期値: [][]
値のリスト: [], 'big', 'medium', 'small'[], "big", "medium", "small"
ModelIDmodelIDmodel_id (output_control) deformable_model → (handle)HTuple (HHandle)HDeformableModel, HTuple (IntPtr)HHandleHtuple (handle)
モデルのハンドル
結果
パラメーターが有効ならば、オペレーター
create_local_deformable_modelCreateLocalDeformableModel は値 2 (H_MSG_TRUE) を返します。必要であれば、
例外処理が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
determine_deformable_model_paramsDetermineDeformableModelParams
後処理の候補
set_deformable_model_originSetDeformableModelOrigin, set_deformable_model_paramSetDeformableModelParam, get_deformable_model_contoursGetDeformableModelContours, find_local_deformable_modelFindLocalDeformableModel, get_deformable_model_paramsGetDeformableModelParams, write_deformable_modelWriteDeformableModel, clear_deformable_modelClearDeformableModel
他の選択候補
read_deformable_modelReadDeformableModel
関連項目
create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel, create_planar_calib_deformable_modelCreatePlanarCalibDeformableModel
モジュール
Matching