select_shape_xld🔗
説明🔗
select_shape_xld — 形状特徴量により XLD データまたはポリゴンを選択する。
書式🔗
select_shape_xld( xld XLD, out xld SelectedXLD, string Features, string Operation, real Min, real Max )
説明🔗
オペレーター select_shape_xld は、XLD またはポリゴンをその
形状に基づいて選択します。XLD 内の各 XLD または
ポリゴン域において、指定した特徴量 (Features) が計算され
ます。計算された特徴のすべての条件 (Operation = 'and') ま
たは、少なくとも 1 つの条件 (Operation = 'or') が、限界
値 (Min,Max) の範囲内であれば、XLD またはポリゴ
ンがそれぞれ出力されます。
パラメータMin と Max を'min' または 'max'へ設定でき、
それぞれ上限と下限を無制限にすることができます。
条件:
Featuresの可能な値は以下のとおりです:
(すべての特徴はポリゴンでも使用できます)
-
‘area’: XLD の面積 (see
area_center_xldを参照) -
‘area_points’: XLD 点の面積 (
area_center_points_xldを参照) -
‘row’: 重心の行インデックス (
area_center_xldを参照) -
‘column’: 重心の列インデックス (
area_center_xldを参照) -
‘row_points’: XLD 点の重心の行インデックス(
area_center_points_xldを参照) -
‘column_points’: XLD 点の重心の列インデックス(
area_center_points_xldを参照) -
‘width’: XLD の幅 (
height_width_ratio_xldを参照) -
‘height’: XLD の高さ (
height_width_ratio_xldを参照) -
‘ratio’: XLD点の幅に対する高さの比率 (
height_width_ratio_xldを参照) -
‘row1’: 左上隅の行座標(インデックス) (
smallest_rectangle1_xldを参照) -
‘column1’: 左上隅の列座標(インデックス)(
smallest_rectangle1_xldを参照) -
‘row2’: 右下隅の行座標(インデックス)(
smallest_rectangle1_xldを参照) -
‘column2’: 右下隅の列座標(インデックス)(
smallest_rectangle1_xldを参照) -
‘circularity’: 真円度(
circularity_xldを参照) -
‘compactness’: コンパクト性(
compactness_xldを参照) -
‘rectangularity’:長方形度合い(
rectangularity_xldを参照) -
‘contlength’: XLD の全長(
length_xldを参照) -
‘convexity’: 凸面度(
convexity_xldを参照) -
‘ra’: 楕円近似の長軸の半径(
elliptic_axis_xldを参照) -
‘rb’: 楕円近似の短軸の半径(
elliptic_axis_xldを参照) -
‘phi’: 楕円近似の方向(
elliptic_axis_xldを参照) -
‘ra_points’: XLD の近似楕円の長軸の半径(
elliptic_axis_points_xldを参照) -
‘rb_points’: XLD の近似楕円の短軸の半径(
elliptic_axis_points_xldを参照) -
‘phi_points’: XLD の近似楕円の方向(
elliptic_axis_points_xldを参照) -
‘anisometry:’ 形状特性(
eccentricity_xldを参照) -
‘anisometry_points:’ XLD 点の形状特性(
eccentricity_points_xldを参照) -
‘bulkiness:’ かさばり(
eccentricity_xldを参照) -
‘struct_factor:’ 構造係数(
eccentricity_xldを参照) -
‘outer_radius’: 領域を囲む最小円の半径(
smallest_circle_xldを参照) -
‘max_diameter’: XLD の最大直径(
diameter_xldを参照) -
‘orientation’: XLD の方向(see
orientation_xldを 参照) -
‘orientation_points’: XLD 点の方向(
orientation_points_xldを参照) -
‘rect2_phi’: 領域を囲む最小矩形の方向(
smallest_rectangle2_xldを参照) -
‘rect2_len1’: 領域を囲む最小矩形の長さの半分(
smallest_rectangle2_xldを参照) -
‘rect2_len2’: 領域を囲む最小矩形の幅の半分(
smallest_rectangle2_xldを参照) -
‘moments_m11’, ‘moments_m20’, ‘moments_m02’: XLD の幾何学モーメント(
moments_region_2ndを参照) -
‘moments_m11_points’, ‘moments_m20_points’, ‘moments_m02_points’: XLD 点の幾何学モーメント(
moments_points_xldを参照)
ただ 1 つの特徴(Features)が使用される場合、
Operation の値は意味がありません。複数の特徴を選ぶ場合、
入力された順番で処理されます。入力特徴には、使用する場合入力 XLD
またはポリゴンがそれぞれ交わってはいけないということが必要なときも
あります。さもなければ、結果は意味を持ちません。(入力 XLD または
ポリゴンがそれ自身と交わっているかどうかは、
test_self_intersection_xld で判定することができます。)
実行情報🔗
実行情報
-
マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)
-
マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)
-
並列演算処理には未対応
パラメーター🔗
XLD (input_object) xld-array → object
調査される輪郭あるいはポリゴン
SelectedXLD (output_object) xld-array → object
条件を満たす (選択された) XLD またはポリゴン
Features (input_control) string(-array) → (string)
チェックする形状特徴
初期値: 'area'
値のリスト: 'anisometry', 'anisometry_points', 'area', 'area_points', 'bulkiness', 'circularity', 'column', 'column1', 'column2', 'column_points', 'compactness', 'contlength', 'convexity', 'height', 'max_diameter', 'moments_m02', 'moments_m02_points', 'moments_m11', 'moments_m11_points', 'moments_m20', 'moments_m20_points', 'orientation', 'orientation_points', 'outer_radius', 'phi', 'phi_points', 'ra', 'ra_points', 'ratio', 'rb', 'rb_points', 'rect2_len1', 'rect2_len2', 'rect2_phi', 'rectangularity', 'row', 'row1', 'row2', 'row_points', 'struct_factor', 'width'
Operation (input_control) string → (string)
個々の特徴の組み合わせ方法
初期値: 'and'
値のリスト: 'and', 'or'
Min (input_control) real(-array) → (real / integer / string)
特徴の下限値もしくは ‘min’
初期値: 150.0
最小増分: 0.001
推奨増分: 1.0
Max (input_control) real(-array) → (real / integer / string)
特徴の上限値もしくは ‘max’
初期値: 99999.0
最小増分: 0.001
推奨増分: 1.0
制限: Max >= Min
結果🔗
入力が空でない場合、オペレーター select_shape_xld は、値
2 (H_MSG_TRUE) を返します。入力が空の場合(入力オブジェクトが得られない)の
動作は、オペレーター
set_system('no_object_result',<Result>) を通して設定されま
す。必要に応じて、例外が発生します。
他のオペレーターとの組み合わせ🔗
組み合わせ
前処理の候補
gen_contours_skeleton_xld, edges_sub_pix, threshold_sub_pix, gen_contour_polygon_xld, test_self_intersection_xld
後処理の候補
関連項目
area_center_xld, area_center_points_xld, circularity_xld, compactness_xld, convexity_xld, elliptic_axis_xld, elliptic_axis_points_xld, eccentricity_xld, eccentricity_points_xld, rectangularity_xld, smallest_circle_xld, smallest_rectangle1_xld, smallest_rectangle2_xld, diameter_xld, orientation_xld, orientation_points_xld, moments_xld, moments_points_xld, select_obj
モジュール🔗
Foundation