ヘルプ センターヘルプ センター
マウスを使用した四角形の指定
getrect は推奨されません。代わりに、ROI の形状の作成で説明されている、いずれかの ROI クラスを使用してください。
getrect
rect = getrect
rect = getrect(fig)
rect = getrect(ax)
例
rect = getrect ではマウスを使用して現在の座標軸内で四角形を選択することができます。四角形の選択が完了すると、getrect は四角形の位置とサイズに関する情報を rect に返します。
rect
マウスをクリックして、目的の四角形をドラッグします。四角形を正方形にするには、Shift キーを押しながらまたは右クリックの状態でドラッグします。
rect = getrect(fig) ではマウスを使用して Figure fig の現在の座標軸内で四角形を選択することができます。
fig
rect = getrect(ax) ではマウスを使用して座標軸 ax 内で四角形を選択することができます。
ax
すべて折りたたむ
imshow を使用してイメージを表示します。
imshow
imshow('moon.tif')
表示されたイメージ内の点を、マウスを使用して対話形式で選択します。終了すると、getrect で四角形のサイズと位置が返されます。
Figure ハンドル。ハンドルとして指定します。
Axes ハンドル。ハンドルとして指定します。
選択した四角形。[xmin ymin width height] の形式で 4 要素の数値ベクトルとして返されます。
[xmin ymin width height]
R2006a より前に導入
getline | getpts | imrect
getline
getpts
imrect
次の 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office