Main Content

imhandles

すべての Image オブジェクトを取得

説明

himage = imhandles(hparent) は、先祖が hparent である image オブジェクトをすべて返します。imhandles は、image オブジェクトの Figure がそれらの親と同じでない場合、エラーを返します。imhandles はカラー バーを無視します。

すべて折りたたむ

イメージを表示します。

imshow('kobi.png')

現在の座標軸の image オブジェクトを返します。

imageobj = imhandles(gca)
imageobj = 
  Image with properties:

           CData: [1224x1632x3 uint8]
    CDataMapping: 'direct'

  Use GET to show all properties

同じ Figure に 2 つのイメージを表示し、imhandles を使用して、Figure の両方の image オブジェクトを取得します。

figure
subplot(1,2,1)
imshow('kobi.png')
subplot(1,2,2)
imshow('sherlock.jpg')

imageobjs = imhandles(gcf)
imageobjs = 
  2x1 Image array:

  Image
  Image

imageobjs 配列の最初のイメージを検査します。

imageobjs(1)
ans = 
  Image with properties:

           CData: [640x960x3 uint8]
    CDataMapping: 'direct'

  Use GET to show all properties

入力引数

すべて折りたたむ

親のグラフィックス オブジェクト。figure、axes、uipanel、または image グラフィックス オブジェクトのハンドルとして指定します。

出力引数

すべて折りたたむ

先祖が hparent である image オブジェクト。イメージまたはイメージの配列として返されます。

バージョン履歴

R2006a より前に導入

参考

|