WIL説明書(C++)
3.0.0
|
FVCL::FPM2::CreateFeature | ( | FVCL::FPM2::CFvFPM2Feature * | dst, |
const FVCL::Edge::CFvEdgeResultD64 & | edges, | ||
INT | match_mode, | ||
INT | width, | ||
INT | height | ||
) |
FPM特徴量オブジェクトの生成
エッジ点群を指定してオブジェクトを生成します。
[out] | dst | 対象のオブジェクト |
[in] | edges | 元になるエッジ点群 |
[in] | match_mode | マッチングモード [範囲:FVCL::FPM2::MatchMode に定義された定数] |
[in] | width | 元になるエッジ点群の座標範囲(幅) |
[in] | height | 元になるエッジ点群の座標範囲(高さ) |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
24 | FVCL_ErrorCode::NOT_ENOUGH | バッファが不足しています。 |
FVCL::FPM2::CreateTemplate | ( | FVCL::FPM2::CFvFPM2Template * | dst, |
const FVCL::Edge::CFvEdgeResultD64 & | edges, | ||
INT | match_mode, | ||
const FVCL::Data::CFvPoint & | offset, | ||
const FVCL::Data::CFvImage * | src | ||
) |
FPMオブジェクトの生成 (エッジ点群指定)
エッジ点群を指定してオブジェクトを生成します。
[out] | dst | 対象のオブジェクト |
[in] | edges | 元になるエッジ点群 |
[in] | match_mode | マッチングモード [範囲:FVCL::FPM2::MatchMode に定義された定数] |
[in] | offset | マッチング回答オフセット値 (マスターパタン画像の左上位置からの相対値) |
[in] | src | edges を取得したマスターパタン画像 (type:UC8,ch:1) [省略時は null] |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
24 | FVCL_ErrorCode::NOT_ENOUGH | バッファが不足しています。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 画像オブジェクトが異常です。 |
FVCL::FPM2::CreateShapeEllipse | ( | FVCL::FPM2::CFvFPM2Template * | dst, |
DOUBLE | a, | ||
DOUBLE | b, | ||
bool | is_white, | ||
INT | match_mode | ||
) |
FPMオブジェクトの生成 (形状指定:楕円)
形状を指定してオブジェクトを生成します。
[out] | dst | 対象のオブジェクト |
[in] | a | 楕円の方程式 パラメータ a (3.0≦a, 単位:画素) |
[in] | b | 楕円の方程式 パラメータ b (3.0≦b, 単位:画素) |
[in] | is_white | 楕円パタンの色 (true:白(背景より明るい)、false:黒(背景より暗い)) |
[in] | match_mode | マッチングモード [範囲:FVCL::FPM2::MatchMode に定義された定数] |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
24 | FVCL_ErrorCode::NOT_ENOUGH | バッファが不足しています。 |
FVCL::FPM2::CreateShapeRetangle | ( | FVCL::FPM2::CFvFPM2Template * | dst, |
DOUBLE | width, | ||
DOUBLE | height, | ||
bool | is_white, | ||
INT | match_mode | ||
) |
FPMオブジェクトの生成 (形状指定:矩形)
形状を指定してオブジェクトを生成します。
[out] | dst | 対象のオブジェクト |
[in] | width | 矩形のX方向幅(3.0≦width, 単位:画素) |
[in] | height | 矩形のY方向高さ(3.0≦height, 単位:画素) |
[in] | is_white | 矩形パタンの色 (true:白(背景より明るい)、false:黒(背景より暗い)) |
[in] | match_mode | マッチングモード [範囲:FVCL::FPM2::MatchMode に定義された定数] |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
24 | FVCL_ErrorCode::NOT_ENOUGH | バッファが不足しています。 |
FVCL::FPM2::CreateShapeCross | ( | FVCL::FPM2::CFvFPM2Template * | dst, |
DOUBLE | a, | ||
DOUBLE | b, | ||
bool | is_close, | ||
bool | is_white, | ||
INT | match_mode | ||
) |
FPMオブジェクトの生成 (形状指定:十字)
形状を指定してオブジェクトを生成します。
[out] | dst | 対象のオブジェクト |
[in] | a | 十字パタンのパラメータ a (3.0≦a, 単位:画素) |
[in] | b | 十字パタンのパラメータ b (1.0≦b, b<a,単位:画素) |
[in] | is_close | 十字パタンの開閉状態 (true:閉じている、false:開いている) |
[in] | is_white | 十字パタンの色 (true:白(背景より明るい)、false:黒(背景より暗い)) |
[in] | match_mode | マッチングモード [範囲:FVCL::FPM2::MatchMode に定義された定数] |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
24 | FVCL_ErrorCode::NOT_ENOUGH | バッファが不足しています。 |
FVCL::FPM2::GetFeatureEdges | ( | const FVCL::FPM2::CFvFPM2Feature & | src, |
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
特徴量の取得 (マッチング対象)
エッジ点群を取得します。
[in] | src | 対象のオブジェクト |
[out] | edges | 取得したエッジ点群を格納するオブジェクト |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | FPMオブジェクトが異常です。Create を実行してください。 |
FVCL::FPM2::GetFeatureEdgesCount | ( | const FVCL::FPM2::CFvFPM2Feature & | src | ) |
特徴量数の取得 (マッチング対象)
[in] | src | 対象のオブジェクト |
FVCL::FPM2::GetTemplateEdges | ( | const FVCL::FPM2::CFvFPM2Template & | src, |
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
特徴量の取得 (テンプレート)
エッジ点群を取得します。
[in] | src | 対象のオブジェクト |
[out] | edges | 取得したエッジ点群を格納するオブジェクト |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | FPMオブジェクトが異常です。Create を実行してください。 |
FVCL::FPM2::GetTemplateEdgesCount | ( | const FVCL::FPM2::CFvFPM2Template & | src | ) |
特徴量数の取得 (テンプレート)
[in] | src | 対象のオブジェクト |
FVCL::FPM2::GetMatchingEdges | ( | const FVCL::FPM2::CFvFPM2Template & | src, |
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
マッチングで使用した特徴量の取得
エッジ点群を取得します。
[in] | src | 対象のオブジェクト |
[out] | edges | 取得したエッジ点群を格納するオブジェクト |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | FPMオブジェクトが異常です。Create を実行してください。 |
FVCL::FPM2::GetMatchingEdgesCount | ( | const FVCL::FPM2::CFvFPM2Template & | src | ) |
マッチングで使用した特徴量数の取得
[in] | src | 対象のオブジェクト |
FVCL::FPM2::GetRelativeEdges | ( | const FVCL::FPM2::CFvFPM2Template & | src, |
INT | no, | ||
INT | err_wide, | ||
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
指定ポーズ下の対応点の取得
エッジ点群を取得します。
[in] | src | 対象のオブジェクト |
[in] | no | 対応するエッジを取得するサーチ回答番号 (0~) |
[in] | err_wide | 誤差範囲 (0~) |
[out] | edges | 取得したエッジ点群を格納するオブジェクト |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | FPMオブジェクトが異常です。Create を実行してください。 |
FVCL::FPM2::GetCompressedTemplateEdges | ( | const FVCL::FPM2::CFvFPM2Template & | templ, |
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
圧縮特徴量の取得
マスターパタンの特徴量から圧縮特徴量を取得します。
[in] | templ | 特徴量オブジェクト (テンプレート) |
[out] | edges | 取得した特徴量を格納するオブジェクト ※ 内部で再確保されます。 |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 特徴量オブジェクトが異常です。 |
52 | FVCL_ErrorCode::UNEXPECTED_ERROR | 特徴量が見つかりません。 |
User::SampleCode::FPM2::GetCompressedEdges execute. 4.448200 msec, count=3 pattern edges=396 image edges=1888 GetCompressedTemplateEdges: edges = 51 GetCompressedMatchingEdges: edges = 301 GetCompressedFeatureEdges: edges = 301
FVCL::FPM2::GetCompressedMatchingEdges | ( | const FVCL::FPM2::CFvFPM2Template & | templ, |
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
圧縮特徴量の取得
最後にマッチングに使用した特徴量から圧縮特徴量を取得します。
[in] | templ | 特徴量オブジェクト (テンプレート) |
[out] | edges | 取得した特徴量を格納するオブジェクト ※ 内部で再確保されます。 |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 特徴量オブジェクトが異常です。 |
52 | FVCL_ErrorCode::UNEXPECTED_ERROR | 特徴量が見つかりません。 |
User::SampleCode::FPM2::GetCompressedEdges execute. 4.448200 msec, count=3 pattern edges=396 image edges=1888 GetCompressedTemplateEdges: edges = 51 GetCompressedMatchingEdges: edges = 301 GetCompressedFeatureEdges: edges = 301
FVCL::FPM2::GetCompressedFeatureEdges | ( | const FVCL::FPM2::CFvFPM2Template & | templ, |
const FVCL::FPM2::CFvFPM2Feature & | target, | ||
FVCL::Edge::CFvEdgeResultD64 * | edges | ||
) |
圧縮特徴量の取得
マッチング対象の特徴量オブジェクト (target) から圧縮特徴量を取得します。
[in] | templ | 特徴量オブジェクト (テンプレート) |
[in] | target | 特徴量オブジェクト (マッチング対象) |
[out] | edges | 取得した特徴量を格納するオブジェクト ※ 内部で再確保されます。 |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 特徴量オブジェクトが異常です。 |
52 | FVCL_ErrorCode::UNEXPECTED_ERROR | 特徴量が見つかりません。 |
User::SampleCode::FPM2::GetCompressedEdges execute. 4.448200 msec, count=3 pattern edges=396 image edges=1888 GetCompressedTemplateEdges: edges = 51 GetCompressedMatchingEdges: edges = 301 GetCompressedFeatureEdges: edges = 301
FVCL::FPM2::SetTemplateEdgelessMask | ( | FVCL::FPM2::CFvFPM2Template & | templ, |
const FVCL::Data::CFvImage & | mask | ||
) |
エッジ減点領域情報の設定
マスターパタンに対するエッジ減点領域情報を設定します。
[in] | templ | 特徴量オブジェクト (テンプレート) |
[in] | mask | エッジ減点領域情報を指定する画像オブジェクト (type:bin, uc8 / ch: 1) 画像のサイズはマスターパタンのサイズと合わせてください。 画素の設定値は以下の通りです。
|
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 特徴量オブジェクトが異常です。 |
FVCL::FPM2::GetTemplateEdgelessMask | ( | const FVCL::FPM2::CFvFPM2Template & | templ, |
FVCL::Data::CFvImage * | mask | ||
) |
エッジ減点領域情報の取得
マスターパタンのエッジ減点領域情報を取得します。
[in] | templ | 特徴量オブジェクト (テンプレート) |
[out] | mask | 取得したエッジ減点領域情報を格納する画像オブジェクト ※ 内部で再確保されます。
|
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 特徴量オブジェクトが異常です。 |
FVCL::FPM2::MatchingRecalcWithEdgelessMask | ( | const FVCL::FPM2::CFvFPM2Template & | templ, |
const FVCL::FPM2::CFvFPM2Feature & | target, | ||
INT | err_wide, | ||
DOUBLE | noise_weight, | ||
INT | threshold, | ||
INT | required_num, | ||
CFvFPM2Result * | result | ||
) |
特定領域エッジ減点スコア計算
指定されたエッジ減点領域情報を使用して特定領域エッジ減点スコアを計算します。
[in] | templ | 特徴オブジェクト (テンプレート) |
[in] | target | 特徴オブジェクト (マッチング対象) |
[in] | err_wide | 対応点誤差範囲 [0~] |
[in] | noise_weight | エッジ減点重み係数 [0~] ※ エッジ減点領域内の 1 つのエッジに対する減点値の重みを表します。 |
[in] | threshold | スコアしきい値 [0~100] |
[in] | required_num | 結果取得数 [1~] |
[out] | result | マッチング結果 |
値 | 定数 | 内容 |
51 | FVCL_ErrorCode::LICENSE_ERROR | ライセンスエラー |
1 | FVCL_ErrorCode::FAILED_TO_ALLOCATE | メモリが不足しています。 |
11 | FVCL_ErrorCode::INVALID_PARAMETER | パラメータが不正です。 |
12 | FVCL_ErrorCode::INVALID_OBJECT | 特徴量オブジェクトが異常です。 |
User::SampleCode::FPM2::MatchingRecalcWithEdgelessMask execute. 4.201200 msec, count=3 0: x,y=178.0,156.0 score=100 s=100.0 q=0.0 1: x,y=249.1,137.9 score=81 s=100.0 q=26.3 2: x,y=18.3,55.4 score=79 s=100.0 q=139.1 GetTemplateEdgelessMask OK MatchingRecalcWithEdgelessMask. 0.823600 msec, count=3 0: x,y=178.0,156.0 score=100 s=100.0 q=0.0 1: x,y=249.1,137.9 score=75 s=100.0 q=26.3 2: x,y=18.3,55.4 score=60 s=100.0 q=139.1