select_matching_linesSelectMatchingLinesSelectMatchingLinesselect_matching_linesselect_matching_lines
説明
select_matching_linesSelectMatchingLinesSelectMatchingLinesselect_matching_linesselect_matching_lines — 領域に最も合致する(HNF 内の)直線から1 組の直線を選択する。
書式
select_matching_lines( region RegionIn, out region RegionLines, hesseline.angle.rad AngleIn, hesseline.distance DistIn, integer LineWidth, integer Thresh, out hesseline.angle.rad AngleOut, out hesseline.distance DistOut )void SelectMatchingLines( const HObject& RegionIn, HObject* RegionLines, const HTuple& AngleIn, const HTuple& DistIn, const HTuple& LineWidth, const HTuple& Thresh, HTuple* AngleOut, HTuple* DistOut )static void HOperatorSet.SelectMatchingLines( HObject regionIn, out HObject regionLines, HTuple angleIn, HTuple distIn, HTuple lineWidth, HTuple thresh, out HTuple angleOut, out HTuple distOut )def select_matching_lines( region_in: HObject, angle_in: MaybeSequence[float], dist_in: MaybeSequence[float], line_width: int, thresh: int ) -> Tuple[HObject, Sequence[float], Sequence[float]]
def select_matching_lines_s( region_in: HObject, angle_in: MaybeSequence[float], dist_in: MaybeSequence[float], line_width: int, thresh: int ) -> Tuple[HObject, float, float]Herror select_matching_lines( const Hobject RegionIn, Hobject* RegionLines, double AngleIn, double DistIn, const Hlong LineWidth, const Hlong Thresh, double* AngleOut, double* DistOut )
Herror T_select_matching_lines( const Hobject RegionIn, Hobject* RegionLines, const Htuple AngleIn, const Htuple DistIn, const Htuple LineWidth, const Htuple Thresh, Htuple* AngleOut, Htuple* DistOut )
HRegion HRegion::SelectMatchingLines( const HTuple& AngleIn, const HTuple& DistIn, Hlong LineWidth, Hlong Thresh, HTuple* AngleOut, HTuple* DistOut ) const
HRegion HRegion::SelectMatchingLines( double AngleIn, double DistIn, Hlong LineWidth, Hlong Thresh, double* AngleOut, double* DistOut ) const
HRegion HRegion.SelectMatchingLines( HTuple angleIn, HTuple distIn, int lineWidth, int thresh, out HTuple angleOut, out HTuple distOut )
HRegion HRegion.SelectMatchingLines( double angleIn, double distIn, int lineWidth, int thresh, out double angleOut, out double distOut )
説明
オペレーター select_matching_linesSelectMatchingLines; は指定したHNF 内で
利用可能なラインの集合から領域に最も合致するラインを選択します。
領域はパラメーター(RegionInregionInregion_in)で入力します。ライン幅は
パラメーター LineWidthlineWidthline_width によって指定することができます。
選択されたラインは、HNF 内に領域(RegionLinesregionLinesregion_lines)として返されます。
ラインはループ内で繰り返し選択されます。まず、入力領域で最も
オーバラップするラインが入力ライン集合から選ばれます。
それから、このラインは、出力集合内に引き継がれます。そのラインに属する
すべての点はオーバラップを決定する以降のステップでは考慮されません。
領域の最大オーバラップ値があるしきい値(Threshthreshthresh)以下に
なったとき、処理はループを抜けます。選択されたラインは HNF と同様、
領域として返されます。
実行情報
実行情報
パラメーター
RegionInregionInregion_in (input_object) region → objectHObjectHRegionHObjectHobject
ラインがマッチングされるべき領域
RegionLinesregionLinesregion_lines (output_object) region(-array) → objectHObjectHRegionHObjectHobject *
マッチングされたラインを含む領域配列
AngleInangleInangle_in (input_control) hesseline.angle.rad(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)
入力ラインの法線ベクトルの角度 (ラジアン単位)
値域: -1.5707963 ≤ AngleIn ≤ 3.1415927
DistIndistIndist_in (input_control) hesseline.distance(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)
入力ラインと原点の距離
要素数: DistIn == AngleIn
LineWidthlineWidthline_width (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)
ラインの幅
初期値: 77
値域: 1 ≤ LineWidth
Threshthreshthresh (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)
領域内のライン点数に対するしきい値
初期値: 100100
値域: 1 ≤ Thresh
AngleOutangleOutangle_out (output_control) hesseline.angle.rad(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
選択されたラインの法線ベクトルの角度 (ラジアン単位)
要素数: AngleOut <= AngleIn
値域: -1.5707963 ≤ AngleOut ≤ 3.1415927
DistOutdistOutdist_out (output_control) hesseline.distance(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
選択されたラインと原点の距離
要素数: DistOut == AngleOut
値域: 0 ≤ DistOut
結果
入力が空でなければ、オペレーター select_matching_linesSelectMatchingLines は
値 2 (H_MSG_TRUE) を返します。入力が空の場合の動作(入力領域が得られなかった場合)は、
オペレーター set_system('no_object_result',<Result>) によって
設定され、入力が空き領域の場合の
動作は set_system('empty_region_result',<Result>) によって
設定されます。必要ならば、例外が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
hough_linesHoughLines
モジュール
Foundation