基準点座標の補正計算

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

Syntax

C#
public static int fnFIE_xyqn_correction(
	FHANDLE hcalib,
	DPNT_T_PTR pos_tbl
)
Visual Basic
Public Shared Function fnFIE_xyqn_correction ( 
	hcalib As FHANDLE,
	pos_tbl As DPNT_T_PTR
) As Integer

Parameters

hcalib
Type: fvalgcli..::..FHANDLE
キャリブレーションシステムのハンドル
pos_tbl
Type: fvalgcli..::..DPNT_T_PTR
補正計算用座標値群を格納したテーブル

Return Value

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

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_INVALID_OBJECT 不正なオブジェクトが渡された
F_ERR_INVALID_PARAM不正なパラメータが渡された
  • pos_tbl が IntPtr.Zero
  • 事前に fnFIE_xyqn_calc_table() が実行されていない
F_ERR_NO_LICENCEライセンスエラー、または未初期化エラー

Remarks

具体的な使用方法についてはサンプルプロジェクトの xyqn をご参照ください。 サンプルプロジェクトはインストーラでは配布されませんので、 弊社ホームページからダウンロードしてください。

Examples

C# Copy imageCopy
//    $Revision: 1.1 $

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;
using fvalgcli;

namespace TC
{
    public partial class FIE
    {
        /// <summary>
        /// 基準点座標の補正計算
        /// </summary>
        /// <param name="hCalib"></param>
        public void fnFIE_xyqn_correction(FHANDLE hCalib)
        {
            DPNT_T_PTR pos_tbl = IntPtr.Zero;

            try
            {
                pos_tbl = DPNT_T_PTR.alloc(8);

                {
                    pos_tbl[0] = DPNT_T.init(50, 50);
                    pos_tbl[1] = DPNT_T.init(50, 100);
                    pos_tbl[2] = DPNT_T.init(100, 100);
                    pos_tbl[3] = DPNT_T.init(0, 0);
                    pos_tbl[4] = DPNT_T.init(75, 75);
                    pos_tbl[5] = DPNT_T.init(75, 25);
                    pos_tbl[6] = DPNT_T.init(150, 150);
                    pos_tbl[7] = DPNT_T.init(25, 25);
                };

                int status = api.fnFIE_xyqn_correction(hCalib, pos_tbl);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_xyqn_correction: エラーが発生しました。({0})", (f_err)status);
                Console.WriteLine("fnFIE_xyqn_correction");
            }
            finally
            {
                pos_tbl.Dispose();
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

Imports System.Collections.Generic
Imports System.IO
Imports System.Text
Imports System.Runtime.InteropServices
Imports fvalgcli

Public Partial Class FIE
    ''' <summary>
    ''' 基準点座標の補正計算
    ''' </summary>
    ''' <param name="hCalib"></param>
    Public Sub fnFIE_xyqn_correction(hCalib As FHANDLE)
        Dim pos_tbl As DPNT_T_PTR = IntPtr.Zero

        Try
            pos_tbl = DPNT_T_PTR.alloc(8)

            If True Then
                pos_tbl(0) = DPNT_T.init(50, 50)
                pos_tbl(1) = DPNT_T.init(50, 100)
                pos_tbl(2) = DPNT_T.init(100, 100)
                pos_tbl(3) = DPNT_T.init(0, 0)
                pos_tbl(4) = DPNT_T.init(75, 75)
                pos_tbl(5) = DPNT_T.init(75, 25)
                pos_tbl(6) = DPNT_T.init(150, 150)
                pos_tbl(7) = DPNT_T.init(25, 25)
            End If



            Dim status As Integer = api.fnFIE_xyqn_correction(hCalib, pos_tbl)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_xyqn_correction: エラーが発生しました。({0})", CType(status, f_err))
            Console.WriteLine("fnFIE_xyqn_correction")
        Finally
            pos_tbl.Dispose()
        End Try
    End Sub
End Class

See Also