Skip to content

info_edgesInfoEdgesInfoEdgesinfo_edgesT_info_edges🔗

説明🔗

info_edgesInfoEdgesInfoEdgesinfo_edgesT_info_edges — edges_imageEdgesImage で使用されるフィルターのフィルター係数を返す。

書式🔗

info_edges( string Filter, string Mode, real Alpha, out integer Size, out integer Coeffs )void InfoEdges( const HTuple& Filter, const HTuple& Mode, const HTuple& Alpha, HTuple* Size, HTuple* Coeffs )static void HOperatorSet.InfoEdges( HTuple filter, HTuple mode, HTuple alpha, out HTuple size, out HTuple coeffs )def info_edges( filter: str, mode: str, alpha: float ) -> Tuple[int, Sequence[int]]

Herror T_info_edges( const Htuple Filter, const Htuple Mode, const Htuple Alpha, Htuple* Size, Htuple* Coeffs )

static Hlong HMisc::InfoEdges( const HString& Filter, const HString& Mode, double Alpha, HTuple* Coeffs )

static Hlong HMisc::InfoEdges( const char* Filter, const char* Mode, double Alpha, HTuple* Coeffs )

static Hlong HMisc::InfoEdges( const wchar_t* Filter, const wchar_t* Mode, double Alpha, HTuple* Coeffs ) (Windows only)

static int HMisc.InfoEdges( string filter, string mode, double alpha, out HTuple coeffs )

説明🔗

info_edgesInfoEdges は edges_imageEdgesImage で使用する任意のフィル ターの係数Coeffscoeffscoeffsとフィルター幅Sizesizesizeの推定値を 返します。そのためには、最初のフィルター係数が最大係数の 5 パーセント未満になるまで、そのフィルターの対応する連続イ ンパルス応答がサンプリングされます。Alphaalphaalpha はフィルターパ ラメーターです(edges_imageEdgesImage を参照)。以下に示す 7 つのエ ッジオペレーターがサポートされています(パラメーター Filterfilterfilter)。

'deriche1'"deriche1", 'lanser1'"lanser1", 'deriche2'"deriche2", 'lanser2'"lanser2", 'shen'"shen", 'mshen'"mshen" と 'canny'"canny" です。

パラメーター Modemodemode('edge'"edge"/'smooth'"smooth")は、対応するエッジま たはスムージングオペレーターのどちらをサンプリングするかを決めるた めに使用します。(Gaussianスムージングを使用する) Canny オペレーターは、従来のフィルターマスクを使用して実装されます。 したがって、Canny フィルターに対しては、1 次元のインパルス応答の係数 Coeffscoeffscoeffsは \(f(n)\) with \(n \ge 0\)として 返されます。他のすべてのフィルターは再帰的に実装されます; ここで、 Coeffscoeffscoeffs は、該当する非再帰的フィルターの係数です。

注意🔗

入力画像としてドメインを絞り込んだ画像を用いた場合、期待しない結果と なる場合があります。章Filters を確認ください。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Filterfilterfilter (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

エッジオペレーター名

初期値: 'lanser2'"lanser2"
値のリスト: 'canny', 'deriche1', 'deriche2', 'lanser1', 'lanser2', 'mshen', 'shen'"canny", "deriche1", "deriche2", "lanser1", "lanser2", "mshen", "shen"

Modemodemode (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

1 次元エッジフィルター (‘edge’) もしくは 1 次元ス ムージングフィルター (‘smooth’)

初期値: 'edge'"edge"
値のリスト: 'edge', 'smooth'"edge", "smooth"

Alphaalphaalpha (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

フィルターパラメーター:平滑化を強くする場合には小さ な値、つまり細かい部分が少なくなります (’ canny’の反対)

初期値: 0.50.5
最小増分: 0.01
推奨増分: 0.1
制限: Alpha > 0.0

Sizesizesize (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

ピクセル単位でのフィルター幅

Coeffscoeffscoeffs (output_control) integer-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Canny フィルター:1 次元インパルス応答の「正」の係 数 その他: 該当する非再帰的フィルターの係数

例🔗

(HDevelop)


read_image(Image,'fabrik')
info_edges('lanser2','edge',0.5,Size,Coeffs)
edges_image(Image,Amp,Dir,'lanser2',0.5,'none',-1,-1)
hysteresis_threshold(Amp,Margin,20,30,30)
(C)
read_image(&Image,"fabrik")\;
info_edges("lanser2","edge",0.5,Size,Coeffs)\;
edges_image(Image,&Amp,&Dir,"lanser2",0.5,"none",-1,-1)\;
hysteresis_threshold(Amp,&Margin,20,30,30)\;

結果🔗

info_edgesInfoEdges は、すべてのパラメーターが正しい場合に 2 (H_MSG_TRUE) を 返します。入力が空の場合、 set_system('no_object_result',<Result>) を通じて設定するこ とができます。必要に応じて、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

後処理の候補

edges_imageEdgesImage, thresholdThreshold, skeletonSkeleton

関連項目

edges_imageEdgesImage

モジュール🔗

Foundation