Huモーメント不変量の取得
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static int fnFIE_measure_get_hu_moments(
FHANDLE hresult,
uint blobno,
DOUBLE_PTR h
) |
Visual Basic |
---|
Public Shared Function fnFIE_measure_get_hu_moments (
hresult As FHANDLE,
blobno As UInteger,
h As DOUBLE_PTR
) As Integer |
Return Value
Type:
Int32
以下のエラーコードを返します。
エラーコード:f_err | 内容 |
---|
F_ERR_NONE | 正常終了 |
F_ERR_INVALID_OBJECT | hresult に指定されたオブジェクトハンドルが不正 |
F_ERR_INVALID_PARAM | blobno に指定されたブローブ番号が不正, パラメータに NULL pointer が渡された |
F_ERR_NO_LICENCE | ライセンスエラー、または未初期化エラー |
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
public void fnFIE_measure_get_hu_moments(FHANDLE result, uint blobno)
{
var phu = DOUBLE_PTR.Zero;
try
{
phu = DOUBLE_PTR.alloc(7);
Assert.IsTrue(phu != DOUBLE_PTR.Zero, "phu が異常です.");
int status = api.fnFIE_measure_get_hu_moments(result, blobno, phu);
Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_measure_get_hu_moments: エラーが発生しました。({0})", (f_err)status);
Console.WriteLine("fnFIE_measure_get_hu_moments");
for (int i = 0; i < 7; i++)
{
Console.WriteLine("phu[{0}]={1}", i, phu[i]);
}
}
finally
{
phu.Dispose();
}
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
Public Sub fnFIE_measure_get_hu_moments(result As FHANDLE, blobno As UInteger)
Dim phu As DOUBLE_PTR = DOUBLE_PTR.Zero
Try
phu = DOUBLE_PTR.alloc(7)
Assert.IsTrue(phu <> DOUBLE_PTR.Zero, "phu が異常です.")
Dim status As Integer = api.fnFIE_measure_get_hu_moments(result, blobno, phu)
Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_measure_get_hu_moments: エラーが発生しました。({0})", CType(status, f_err))
Console.WriteLine("fnFIE_measure_get_hu_moments")
For i As Integer = 0 To 6
Console.WriteLine("phu[{0}]={1}", i, phu(i))
Next
Finally
phu.Dispose()
End Try
End Sub
End Class |
See Also