Get all image objects
himage = imhandles(hparent)
example
himage = imhandles(hparent) returns all of the image objects whose ancestor is hparent. imhandles returns an error if the image objects do not have the same figure as their parent. imhandles ignores color bars.
himage
hparent
imhandles
collapse all
Display an image.
imshow('kobi.png')
Return the image object in the current axes.
imageobj = imhandles(gca)
imageobj = Image with properties: CData: [1224x1632x3 uint8] CDataMapping: 'direct' Show all properties
Display two images in the same figure and use imhandles to get both of the image objects in the figure.
figure subplot(1,2,1) imshow('kobi.png') subplot(1,2,2) imshow('sherlock.jpg')
imageobjs = imhandles(gcf)
imageobjs = 2x1 Image array: Image Image
Inspect the first image in the imageobjs array.
imageobjs
imageobjs(1)
ans = Image with properties: CData: [640x960x3 uint8] CDataMapping: 'direct' Show all properties
Parent graphics object, specified as a handle to a figure, axes, uipanel, or image graphics objects.
Image objects whose ancestor is hparent, returned as an image or array of images.
imgca | imgcf
imgca
imgcf
You have a modified version of this example. Do you want to open this example with your edits?