曲率画像生成
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static int fnFIE_ps_curvature(
FHANDLE hsrc,
FHANDLE hdst,
double normal_thresh,
f_curvature_type curvature_type
) |
Visual Basic |
---|
Public Shared Function fnFIE_ps_curvature (
hsrc As FHANDLE,
hdst As FHANDLE,
normal_thresh As Double,
curvature_type As f_curvature_type
) As Integer |
Return Value
Type:
Int32
以下のエラーコードを返します。
エラーコード:f_err | 内容 |
---|
F_ERR_NONE | 正常終了 |
F_ERR_NOMEMORY | メモリ不足 |
F_ERR_INVALID_IMAGE | 不正な画像オブジェクト |
F_ERR_INVALID_PARAM | パラメータ異常 |
F_ERR_NO_LICENCE | ライセンスエラー、または未初期化エラー |
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
[FvPluginExecute]
public void fnFIE_ps_curvature()
{
int status = (int)f_err.F_ERR_NONE;
FHANDLE hsrc = FHANDLE.Zero;
FHANDLE hdst = FHANDLE.Zero;
try
{
api.fnFIE_load_img_file(TestImageDir + "/TC/PS/fie_ps_sample-double.tiff",
ref hsrc, f_color_img_type.F_COLOR_IMG_TYPE_UC8);
int width = api.fnFIE_img_get_width(hsrc);
int height = api.fnFIE_img_get_height(hsrc);
int type = api.fnFIE_img_get_type(hsrc);
hdst = api.fnFIE_img_root_alloc(type, 1, width, height);
status = api.fnFIE_ps_curvature(hsrc, hdst, 0.1, f_curvature_type.F_CURVATURE_MEAN);
if (status != 0)
throw new FvException(status);
api.fnFIE_save_tiff(ResultDir + "/fnFIE_ps_curvature.tiff",
hdst, f_tiff_compression.F_TIFF_COMPRESSION_DEFLATE, -1);
}
finally
{
hsrc.Dispose();
hdst.Dispose();
}
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_ps_curvature()
Dim status As Integer = CInt(f_err.F_ERR_NONE)
Dim hsrc As FHANDLE = FHANDLE.Zero
Dim hdst As FHANDLE = FHANDLE.Zero
Try
api.fnFIE_load_img_file(TestImageDir & "/TC/PS/fie_ps_sample-double.tiff", _
hsrc, f_color_img_type.F_COLOR_IMG_TYPE_UC8)
Dim width As Integer = api.fnFIE_img_get_width(hsrc)
Dim height As Integer = api.fnFIE_img_get_height(hsrc)
Dim type As Integer = api.fnFIE_img_get_type(hsrc)
hdst = api.fnFIE_img_root_alloc(type, 1, width, height)
status = api.fnFIE_ps_curvature(hsrc, hdst, 0.1, f_curvature_type.F_CURVATURE_MEAN)
If status <> 0 Then
Throw New FvException(status)
End If
api.fnFIE_save_tiff(ResultDir & "/fnFIE_ps_curvature.tiff", _
hdst, f_tiff_compression.F_TIFF_COMPRESSION_DEFLATE, -1)
Finally
hsrc.Dispose()
hdst.Dispose()
End Try
End Sub
End Class |
See Also