dilation_circle🔗
説明🔗
dilation_circle — 円形構造要素を用いて領域を膨張する。
書式🔗
dilation_circle( region Region, out region RegionDilation, real Radius )
説明🔗
dilation_circle は円形構成要素をもつ Minkowski 和を入力
画像 Region に適用します。
円形マスクは対称であり、これは膨張と同一です。構成要素として使用さ
れる円の大きさは Radius で決定されます。
このオペレーターは領域全体を拡大し、領域の境界をなめらかにし、領域
の内部にある円形マスクよりも小さい穴を閉じます。領域の移動を避ける
ために Radius に対して、\(3.5\)、\(5.5\) などの値を選択してく
ださい。整数の半径を設定すると、非整数の重心をもつ円となるため、整
数にまるめられ、結果として領域の移動を引き起こします。
注意🔗
dilation_circle は、入力領域に対して個別に適用されます。もし、異な
る領域の間のギャップを閉じる必要があれば、union1 または
union2 を最初に呼び出す必要があります。
実行情報🔗
実行情報
-
マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)
-
マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)
-
tupleレベルで自動的に並列演算処理を実施
パラメーター🔗
Region (input_object) region(-array) → object
膨張処理(dilation)の対象領域
RegionDilation (output_object) region(-array) → object
膨張処理(dilation)された領域
Radius (input_control) real → (real / integer)
円形構造要素の半径
初期値: 3.5
推奨値: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5
値域: 0.5 ≤ Radius ≤ 511.5 (lin)
最小増分: 1.0
推奨増分: 1.0
例🔗
(C)
my_dilation_circle(Hobject In, double Radius, Hobject *Out)
{
Hobject Circle\;
gen_circle(&Circle,100.0,100.0,Radius)\;
minkowski_add1(In,Circle,Out,1)\;
}
#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std\;
#endif
#include "HalconCpp.h"
main()
{
cout << "Reproduction of 'dilation_circle ()'" << endl\;
cout << "First = original image " << endl\;
cout << "Blue = after dilation " << endl\;
cout << "Red = before dilation " << endl\;
HByteImage img("monkey")\;
HWindow w\;
HRegion circ = HRegion::GenCircle (10, 10, 1.5)\;
HRegionArray regs = (img >= 128).Connection()\;
HRegionArray minadd = regs.MinkowskiAdd1 (circ, 1)\;
img.Display (w)\; w.Click ()\;
w.SetColor ("blue")\; minadd.Display (w)\; w.Click ()\;
w.SetColor ("red")\; regs.Display (w)\; w.Click ()\;
return(0)\;
}
複雑性🔗
入力領域の面積を \(F1\) とします。その場合、 1 つの領域に対する実行時間は以下のようになります。
結果🔗
dilation_circle は、すべてのパラメーターが正しい場合に
2 (H_MSG_TRUE) を返します。空または入力領域がない場合の動作は、次の設
定に従います。
-
領域がない場合:
set_system('no_object_result',<RegionResult>) -
領域が空の場合:
set_system('empty_region_result',<RegionResult>)
そうでない場合、例外処理が発生します。
他のオペレーターとの組み合わせ🔗
組み合わせ
前処理の候補
threshold, regiongrowing, connection, union1, watersheds, class_ndim_norm
後処理の候補
reduce_domain, select_shape, area_center, connection
他の選択候補
minkowski_add1, minkowski_add2, expand_region, dilation1, dilation2, dilation_rectangle1
関連項目
モジュール🔗
Foundation