You are here : matlabImage Processinggetimage

getimage() - Image Processing

A = getimage(h) returns
the first image data contained in the Handle Graphics object h. h can
be a figure, axes, or image. A is identical to
the image CData; it contains the same values and
is of the same class (uint8, uint16, double,
or logical) as the image CData.
If h is not an image or does not contain an image, A is
empty.[x, y, A] = getimage(h) returns
the image XData in x and the YData in y. XData and YData are
two-element vectors that indicate the range of the x-axis
and y-axis.[..., A, flag] = getimage(h) returns
an integer flag that indicates the type of image h contains.
This table summarizes the possible values for flag.FlagType of Image
0Not an image; A is returned as an
empty matrix
1Indexed image
2Intensity image with values in standard range ([0,1]
for single and double arrays,
[0,255] for uint8 arrays, [0,65535] for uint16 arrays)
3Intensity data, but not in standard range
4RGB image
5Binary image
[...] = getimage returns
information for the current axes object. It is equivalent to [...]
= getimage(gca).


A = getimage(h)[x, y, A] = getimage(h)[..., A, flag] = getimage(h)[...] = getimage


h = imshow(ones(10,'int16')); 

Output / Return Value


Alternatives / See Also