inROI
点が ROI 内にあるかどうかのクエリ
説明
例
四角形 ROI 内部の点のクエリ
イメージをワークスペースに読み取って表示します。
I = imread('trailer.jpg');
figure
imshow(I)
Position
引数を使用して四角形の位置を [xmin,ymin,width,height]
として指定し、イメージ上に四角形 ROI を描画します。
h = drawrectangle('Position',[190 308 682 276],'StripeColor','r');
3 つの点の x 座標と y 座標を指定します。最後の点は四角形 ROI の左上隅です。
xcoords = [335 335 190]; ycoords = [200 400 308];
3 つの点が ROI の内部にあるかどうかクエリします。
tf = inROI(h,xcoords,ycoords)
tf = 3x1 logical array
0
1
1
入力引数
x
— クエリ点の X 座標
数値スカラー | 数値ベクトル
クエリ点の X 座標。数値スカラーまたはベクトルとして指定します。
y
— クエリ点の Y 座標
数値スカラー | 数値ベクトル
クエリ点の Y 座標。数値スカラーまたはベクトルとして指定します。
z
— クエリ点の Z 座標
数値スカラー | 数値ベクトル
クエリ点の Z 座標。数値スカラーまたはベクトルとして指定します。
出力引数
バージョン履歴
R2018b で導入
参考
createMask
| drawassisted
| drawcircle
| drawcuboid
| drawellipse
| drawfreehand
| drawpolygon
| drawrectangle
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)