回転パターンの生成

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

Syntax

C#
public static int fnFIE_gs2_pattern_rotate(
	FHANDLE hpattern,
	int rot_angle,
	int clip_width,
	int clip_height,
	int rotate_method,
	ref FHANDLE rotate_pattern
)
Visual Basic
Public Shared Function fnFIE_gs2_pattern_rotate ( 
	hpattern As FHANDLE,
	rot_angle As Integer,
	clip_width As Integer,
	clip_height As Integer,
	rotate_method As Integer,
	ByRef rotate_pattern As FHANDLE
) As Integer

Parameters

hpattern
Type: fvalgcli..::..FHANDLE
参考にするパターン
rot_angle
Type: System..::..Int32
回転角 degreeの10倍値
clip_width
Type: System..::..Int32
回転パターン幅の上限
clip_height
Type: System..::..Int32
回転パターン高さの上限
rotate_method
Type: System..::..Int32
回転の方法
  • 0 または 1 NN法
  • 2 bilinear法
rotate_pattern
Type: fvalgcli..::..FHANDLE%
新たに作成する回転済みパターンへのポインタ

Return Value

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

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_NOMEMORYメモリ不足
F_ERR_INVALID_PARAM引数異常
F_ERR_INVALID_OBJECT入力オブジェクト異常
F_ERR_INVALID_IMAGE入力したパターン内の画像が大きすぎる
F_ERR_GS_NO_CONTRAST パタン画像に情報が足りないため、パタンにならない。 (==画像の濃度分散が0.0になる)
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_gs2_pattern_rotate(FHANDLE hPattern)
        {
            FHANDLE rotate_pattern = FHANDLE.Zero;

            try
            {
                // 回転パターンの生成.
                int rot_angle = 10;
                int clip_width = 100;
                int clip_height = 100;
                int rotate_method = 1;
                int status = api.fnFIE_gs2_pattern_rotate(hPattern, rot_angle, clip_width, clip_height, rotate_method, ref rotate_pattern);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_gs2_pattern_rotate: エラーが発生しました。({0})", (f_err)status);
                Console.WriteLine("fnFIE_gs2_pattern_rotate");

                api.fnFIE_save_bmp("fnFIE_gs2_pattern_rotate.bmp", rotate_pattern);
            }
            finally
            {
                // 不要になったパターンの解放.
                rotate_pattern.Dispose();
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

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

Public Partial Class FIE
    Public Sub fnFIE_gs2_pattern_rotate(hPattern As FHANDLE)
        Dim rotate_pattern As FHANDLE = FHANDLE.Zero

        Try
            ' 回転パターンの生成.
            Dim rot_angle As Integer = 10
            Dim clip_width As Integer = 100
            Dim clip_height As Integer = 100
            Dim rotate_method As Integer = 1
            Dim status As Integer = api.fnFIE_gs2_pattern_rotate(hPattern, rot_angle, clip_width, clip_height, rotate_method, rotate_pattern)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_gs2_pattern_rotate: エラーが発生しました。({0})", CType(status, f_err))
            Console.WriteLine("fnFIE_gs2_pattern_rotate")

            api.fnFIE_save_bmp("fnFIE_gs2_pattern_rotate.bmp", rotate_pattern)
        Finally
            ' 不要になったパターンの解放.
            rotate_pattern.Dispose()
        End Try
    End Sub
End Class

See Also