不可欠領域スコア計算
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static int fnFIE_fpm_matching_essential( FHANDLE hfpm, FHANDLE htarget, int err_wide, int threshold, int require_result_num, F_SEARCH_RESULT_PTR pmatching_result, ref int presult_num ) |
Visual Basic |
---|
Public Shared Function fnFIE_fpm_matching_essential ( hfpm As FHANDLE, htarget As FHANDLE, err_wide As Integer, threshold As Integer, require_result_num As Integer, pmatching_result As F_SEARCH_RESULT_PTR, ByRef presult_num As Integer ) As Integer |
Parameters
- hfpm
- Type: fvalgcli..::..FHANDLE
FPMオブジェクト
- htarget
- Type: fvalgcli..::..FHANDLE
不可欠領域領域スコア計算に使用する特徴量情報が格納されたオブジェクト 特徴量オブジェクトが有効です。 IntPtr.Zero が指定された場合にはFPMオブジェクトに格納された(最後にマッチングに使用した)特徴量情報を使用します。
- err_wide
- Type: System..::..Int32
対応点誤差範囲(0<=err_wide)
- threshold
- Type: System..::..Int32
スコア閾値(0<=threshold<=100)
- require_result_num
- Type: System..::..Int32
結果取得数(1<=require_result_num)
- pmatching_result
- Type: fvalgcli..::..F_SEARCH_RESULT_PTR
マッチング結果
- presult_num
- Type: System..::..Int32%
マッチング結果個数
Return Value
Type: Int32以下のエラーコードを返します。
エラーコード:
f_err | 内容 |
---|---|
F_ERR_NONE | 正常終了 |
F_ERR_INVALID_OBJECT | 引数オブジェクトの種別が異常 |
F_ERR_NOMEMORY | メモリ不足 |
F_ERR_INVALID_PARAM | 引数異常 |
F_ERR_FPM_NOFEATURE | 特徴量がありません |
F_ERR_NO_LICENCE | ライセンスエラー、または未初期化エラー |
Remarks
Examples
C# | Copy |
---|---|
// $Revision: 1.1 $ using System; using System.Collections.Generic; using System.Text; using fvalgcli; namespace TC { public partial class FIE { /// <summary> /// 不可欠領域スコア計算. /// </summary> /// <param name="hFPM"></param> /// <param name="hFeature"></param> //[FvPluginExecute] public void fnFIE_fpm_matching_essential(FHANDLE hFPM, FHANDLE hFeature) { F_SEARCH_RESULT_PTR result = IntPtr.Zero; try { int err_wide = 0; int threshold = 60; int require_result_num = 5; result = F_SEARCH_RESULT_PTR.alloc(require_result_num); int result_num = 0; int status = api.fnFIE_fpm_matching_essential(hFPM, hFeature, err_wide, threshold, require_result_num, result, ref result_num); Assert.IsTrue(status == (int)fvalgcli.f_err.F_ERR_NONE, "fnFIE_fpm_matching_essential: エラーが発生しました。({0})", (fvalgcli.f_err)status); Console.WriteLine("fnFIE_fpm_matching_essential"); Console.WriteLine("result_num={0}", result_num); for (int i = 0; i < result_num; i++) Console.WriteLine("result[{0}]=({1},{2},{3},{4}) score={5}", i, result[i].x, result[i].y, result[i].q, result[i].s, result[i].score); } finally { result.Dispose(); } } } } |
Visual Basic | Copy |
---|---|
' $Revision: 1.1 $ Imports System.Collections.Generic Imports System.Text Imports fvalgcli Public Partial Class FIE ''' <summary> ''' 不可欠領域スコア計算. ''' </summary> ''' <param name="hFPM"></param> ''' <param name="hFeature"></param> '[FvPluginExecute] Public Sub fnFIE_fpm_matching_essential(hFPM As FHANDLE, hFeature As FHANDLE) Dim result As F_SEARCH_RESULT_PTR = IntPtr.Zero Try Dim err_wide As Integer = 0 Dim threshold As Integer = 60 Dim require_result_num As Integer = 5 result = F_SEARCH_RESULT_PTR.alloc(require_result_num) Dim result_num As Integer = 0 Dim status As Integer = api.fnFIE_fpm_matching_essential(hFPM, hFeature, err_wide, threshold, require_result_num, result, _ result_num) Assert.IsTrue(status = CInt(fvalgcli.f_err.F_ERR_NONE), "fnFIE_fpm_matching_essential: エラーが発生しました。({0})", CType(status, fvalgcli.f_err)) Console.WriteLine("fnFIE_fpm_matching_essential") Console.WriteLine("result_num={0}", result_num) For i As Integer = 0 To result_num - 1 Console.WriteLine("result[{0}]=({1},{2},{3},{4}) score={5}", i, result(i).x, result(i).y, result(i).q, result(i).s, _ result(i).score) Next Finally result.Dispose() End Try End Sub End Class |