特定領域エッジ減点スコア計算

Namespace: fvalgcli
Assembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)

Syntax

C#
public static int fnFIE_fpm_matching_recalc_with_edgeless_mask(
	FHANDLE hfpm,
	FHANDLE htarget,
	int err_wide,
	double noise_weight,
	int threshold,
	int require_result_num,
	F_SEARCH_RESULT_PTR pmatching_result,
	ref int presult_num
)
Visual Basic
Public Shared Function fnFIE_fpm_matching_recalc_with_edgeless_mask ( 
	hfpm As FHANDLE,
	htarget As FHANDLE,
	err_wide As Integer,
	noise_weight As Double,
	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)
noise_weight
Type: System..::..Double
エッジ減点重み係数(0≦noise_weight) エッジ減点領域内の1つのエッジに対する減点値の重みを表します。
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ライセンスエラー、または未初期化エラー

Examples

C# Copy imageCopy
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>
        public void fnFIE_fpm_matching_recalc_with_edgeless_mask(FHANDLE hFPM, FHANDLE hFeature)
        {
            F_SEARCH_RESULT_PTR result = IntPtr.Zero;

            try
            {
                int err_wide = 0;
                double noise_weight = 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_recalc_with_edgeless_mask(hFPM, hFeature, err_wide, noise_weight, threshold, require_result_num, result, ref result_num);
                Assert.IsTrue(status == (int)fvalgcli.f_err.F_ERR_NONE, "fnFIE_fpm_matching_recalc_with_edgeless_mask: エラーが発生しました。({0})", (fvalgcli.f_err)status);
                Console.WriteLine("fnFIE_fpm_matching_recalc_with_edgeless_mask");
                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 imageCopy
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli

Public Partial Class FIE
    ''' <summary>
    ''' 特定領域エッジ減点スコア計算
    ''' </summary>
    ''' <param name="hFPM"></param>
    ''' <param name="hFeature"></param>
    Public Sub fnFIE_fpm_matching_recalc_with_edgeless_mask(hFPM As FHANDLE, hFeature As FHANDLE)
        Dim result As F_SEARCH_RESULT_PTR = IntPtr.Zero

        Try
            Dim err_wide As Integer = 0
            Dim noise_weight As Double = 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_recalc_with_edgeless_mask(hFPM, hFeature, err_wide, noise_weight, threshold, require_result_num, result, result_num)
            Assert.IsTrue(status = CInt(fvalgcli.f_err.F_ERR_NONE), "fnFIE_fpm_matching_recalc_with_edgeless_mask: エラーが発生しました。({0})", CType(status, fvalgcli.f_err))

            Console.WriteLine("fnFIE_fpm_matching_recalc_with_edgeless_mask")
            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

See Also