Skip to content

gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1gen_rectangle1🔗

説明🔗

gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1gen_rectangle1 — 座標軸に平行な矩形を作成する。

書式🔗

gen_rectangle1( out region Rectangle, rectangle.origin.y Row1, rectangle.origin.x Column1, rectangle.corner.y Row2, rectangle.corner.x Column2 )void GenRectangle1( HObject* Rectangle, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2 )static void HOperatorSet.GenRectangle1( out HObject rectangle, HTuple row1, HTuple column1, HTuple row2, HTuple column2 )def gen_rectangle1( row_1: MaybeSequence[Union[int, float]], column_1: MaybeSequence[Union[int, float]], row_2: MaybeSequence[Union[int, float]], column_2: MaybeSequence[Union[int, float]] ) -> HObject

Herror gen_rectangle1( Hobject* Rectangle, double Row1, double Column1, double Row2, double Column2 )

Herror T_gen_rectangle1( Hobject* Rectangle, const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2 )

void HRegion::HRegion( const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2 )

void HRegion::HRegion( double Row1, double Column1, double Row2, double Column2 )

public HRegion( HTuple row1, HTuple column1, HTuple row2, HTuple column2 )

public HRegion( double row1, double column1, double row2, double column2 )

void HRegion::GenRectangle1( const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2 )

void HRegion::GenRectangle1( double Row1, double Column1, double Row2, double Column2 )

void HRegion.GenRectangle1( HTuple row1, HTuple column1, HTuple row2, HTuple column2 )

void HRegion.GenRectangle1( double row1, double column1, double row2, double column2 )

説明🔗

オペレーター gen_rectangle1GenRectangle1 は、座標軸と平行な 1 つ以上の 矩形領域を生成します。その矩形は左上隅座標 (Row1row1row_1, Column1column1column_1) と右下隅座標 (Row2row2row_2, Column2column2column_2) によって記述されます。 座標点として Tuple配列 を入力することによって、1 つ以上の領域 を一度に生成することができます。 座標系は、左上隅を基点 (0,0) として (Width-1,Height-1) までです。 これに関しては,get_systemGetSystem と reset_obj_dbResetObjDb を参照 してください。

パラメータ ブロードキャスト🔗

このオペレータはパラメータ ブロードキャストをサポートします。 これは、各パラメーターを長さ1 または NのTupleで指定できることを意味する。 Tuple長さ 1 のパラメーターは、作成される項目の数は常に Nになるように内部的に繰り返されます。

実行情報🔗

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

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

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

パラメーター🔗

Rectanglerectanglerectangle (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

生成される矩形

Row1row1row_1 (input_control) rectangle.origin.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

左上隅の行座標

初期値: 30.030.0
推奨値: 0.0, 10.0, 20.0, 50.0, 100.0, 200.00.0, 10.0, 20.0, 50.0, 100.0, 200.0
値域: Row1 (lin)
最小増分: 1.0
推奨増分: 10.0

Column1column1column_1 (input_control) rectangle.origin.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

左上隅の列座標

初期値: 20.020.0
推奨値: 0.0, 10.0, 20.0, 50.0, 100.0, 200.00.0, 10.0, 20.0, 50.0, 100.0, 200.0
値域: Column1 (lin)
最小増分: 1.0
推奨増分: 10.0

Row2row2row_2 (input_control) rectangle.corner.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

右下隅の行座標

初期値: 100.0100.0
推奨値: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0, 511.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0, 511.0
値域: Row2 (lin)
最小増分: 1.0
推奨増分: 10.0
制限: Row2 >= Row1

Column2column2column_2 (input_control) rectangle.corner.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

右下隅の列座標

初期値: 200.0200.0
推奨値: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0, 511.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0, 511.0
値域: Column2 (lin)
最小増分: 1.0
推奨増分: 10.0
制限: Column2 >= Column1

例🔗

(HDevelop)


* Contrast improvement in a rectangular region of interest
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
read_image(Image,'mreut')
dev_display (Image)
draw_rectangle1(WindowHandle,Row1,Column1,Row2,Column2)
gen_rectangle1(Rectangle,Row1,Column1,Row2,Column2)
reduce_domain(Image,Rectangle,Mask)
emphasize(Mask,Emphasize,9,9,1.0)
dev_display (Emphasize)

結果🔗

パラメーター値が正しいならば、オペレーター gen_rectangle1GenRectangle1 は値 2 (H_MSG_TRUE) を返します。 それ以外の場合には例外処理が発生します。 現在の画像フォーマットに従うクリッピングは、オペレーター set_system('clip_region',<'true'/'false'>) によって設定さ れます。

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

組み合わせ

後処理の候補

paint_regionPaintRegion, reduce_domainReduceDomain

他の選択候補

gen_rectangle2GenRectangle2, gen_region_polygonGenRegionPolygon, fill_upFillUp, gen_region_runsGenRegionRuns, gen_region_pointsGenRegionPoints, gen_region_lineGenRegionLine

関連項目

draw_rectangle1DrawRectangle1, reduce_domainReduceDomain, smallest_rectangle1SmallestRectangle1

モジュール🔗

Foundation