REGION特徴量:外接矩形サイズ取得(xdiff、ydiff)

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

Syntax

C#
public static int fnFIE_region_get_xydiff(
	FHANDLE hreg,
	ref int xdiff,
	ref int ydiff
)
Visual Basic
Public Shared Function fnFIE_region_get_xydiff ( 
	hreg As FHANDLE,
	ByRef xdiff As Integer,
	ByRef ydiff As Integer
) As Integer

Parameters

hreg
Type: fvalgcli..::..FHANDLE
REGIONハンドル
xdiff
Type: System..::..Int32%
外接矩形横サイズ
ydiff
Type: System..::..Int32%
外接矩形縦サイズ

Return Value

Type: Int32
以下のエラーコードを返します。

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_INVALID_PARAM不正なパラメータが指定された
  • xdiff、ydiff に IntPtr.Zero が指定された
F_ERR_INVALID_OBJECT不正なハンドル
F_ERR_CALC_IMPOSSIBLE 計算不能
F_ERR_NO_LICENCEライセンスエラー、または未初期化エラー

Remarks

Examples

C# Copy imageCopy
//    $Revision: 1.1 $

using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;

namespace TC
{
    public partial class FIE
    {
        public void fnFIE_region_get_xydiff(FHANDLE hRegion)
        {
            try
            {
                // リージョン特徴量:外接矩形サイズ取得.
                int xdiff = 0;
                int ydiff = 0;
                int status = api.fnFIE_region_get_xydiff(hRegion, ref xdiff, ref ydiff);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_region_get_maxminpos: エラーが発生しました。({0})", (f_err)status);
                Console.WriteLine("fnFIE_region_get_xydiff");

                // 値の確認.
                Console.WriteLine("xdiff={0},ydiff={1}", xdiff, ydiff);
            }
            finally
            {
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli

Public Partial Class FIE
    Public Sub fnFIE_region_get_xydiff(hRegion As FHANDLE)
        Try
            ' リージョン特徴量:外接矩形サイズ取得.
            Dim xdiff As Integer = 0
            Dim ydiff As Integer = 0
            Dim status As Integer = api.fnFIE_region_get_xydiff(hRegion, xdiff, ydiff)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_region_get_maxminpos: エラーが発生しました。({0})", CType(status, f_err))
            Console.WriteLine("fnFIE_region_get_xydiff")

            ' 値の確認.
            Console.WriteLine("xdiff={0},ydiff={1}", xdiff, ydiff)
        Finally
        End Try
    End Sub
End Class

See Also