直線に近いエッジ点群の取得(実数型エッジ点群)

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

Syntax

C#
public static int fnFIE_hough_lines_get_support_edges_d(
	ref F_LH_LINE line,
	F_DEDGE_PTR edges,
	int edge_num,
	double err_r,
	double err_q,
	ref F_DEDGE_PTR support_edges,
	ref int neib_num,
	ref int sort_type
)
Visual Basic
Public Shared Function fnFIE_hough_lines_get_support_edges_d ( 
	ByRef line As F_LH_LINE,
	edges As F_DEDGE_PTR,
	edge_num As Integer,
	err_r As Double,
	err_q As Double,
	ByRef support_edges As F_DEDGE_PTR,
	ByRef neib_num As Integer,
	ByRef sort_type As Integer
) As Integer

Parameters

line
Type: fvalgcli..::..F_LH_LINE%
直線の方程式
edges
Type: fvalgcli..::..F_DEDGE_PTR
エッジ点群(エッジ勾配方向、強度共に必要なし)
edge_num
Type: System..::..Int32
エッジ点の数
err_r
Type: System..::..Double
ρ方向許容誤差(0以上, 単位:ピクセル)
err_q
Type: System..::..Double
θ方向許容誤差(0以上, 単位:度)
support_edges
Type: fvalgcli..::..F_DEDGE_PTR%
直線の近くのエッジ点群。(IntPtr.Zero で初期化してください。)
neib_num
Type: System..::..Int32%
回答した「直線近くのエッジ点」の数
sort_type
Type: System..::..Int32%
support_edges のソートタイプ
  • 0:x座標でソート
  • 1:y座標でソート

Return Value

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

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_NOMEMORYメモリ不足エラー
F_ERR_INVALID_PARAM 不正なパラメータが渡された
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_hough_lines_get_support_edges_d(ref F_LH_LINE ans_line, F_DEDGE_PTR edges, int edge_num, double err_r, double err_q, ref F_DEDGE_PTR support_edges, ref int neib_num, ref int sort_type )
        {
            try
            {
                int status = api.fnFIE_hough_lines_get_support_edges_d(ref ans_line, edges, edge_num, err_r, err_q, ref support_edges, ref neib_num, ref sort_type);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_hough_lines_get_support_edges_d: エラーが発生しました。({0})", (f_err)status);

                Console.WriteLine("fnFIE_hough_lines_get_support_edges_d");
                for (int i = 0; i < neib_num; i++)
                {
                    Console.WriteLine("x,y,q={0},{1},{2}", support_edges[i].x, support_edges[i].y, support_edges[i].q);
                }
            }
            finally
            {
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

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

Public Partial Class FIE
    Public Sub fnFIE_hough_lines_get_support_edges_d(ByRef ans_line As F_LH_LINE, edges As F_DEDGE_PTR, edge_num As Integer, err_r As Double, err_q As Double, ByRef support_edges As F_DEDGE_PTR, _
        ByRef neib_num As Integer, ByRef sort_type As Integer)
        Try
            Dim status As Integer = api.fnFIE_hough_lines_get_support_edges_d(ans_line, edges, edge_num, err_r, err_q, support_edges, _
                neib_num, sort_type)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_hough_lines_get_support_edges_d: エラーが発生しました。({0})", CType(status, f_err))

            Console.WriteLine("fnFIE_hough_lines_get_support_edges_d")
            For i As Integer = 0 To neib_num - 1
                Console.WriteLine("x,y,q={0},{1},{2}", support_edges(i).x, support_edges(i).y, support_edges(i).q)
            Next
        Finally
        End Try
    End Sub
End Class

See Also