Image Processing Toolbox | ![]() ![]() |
Syntax
Description
A = getimage(h)
returns the first image data contained in the Handle Graphics object h
. h
can be a figure, axes, image, or texture-mapped surface. A
is identical to the image CData
; it contains the same values and is of the same class (uint8
or double
) as the image CData
. If h
is not an image or does not contain an image or texture-mapped surface, 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
.
[...] = getimage returns information for the current axes. It is equivalent to [...] = getimage(gca)
.
Class Support
The output array A
is of the same class as the image CData
. All other inputs and outputs are of class double
.
Example
This example illustrates obtaining the image data from an image displayed directly from a file.
![]() | getheight | getneighbors | ![]() |