You are here : matlabImage Processingsubimage

subimage() - Image Processing

You can use subimage in conjunction with subplot to
create figures with multiple images, even if the images have different
colormaps. subimage works by converting images
to truecolor for display purposes, thus avoiding colormap conflicts.subimage(X, map) displays
the indexed image X with colormap map in
the current axes.subimage(I) displays the
intensity image I in the current axes.subimage(BW) displays the
binary image BW in the current axes.subimage(RGB) displays the
truecolor image RGB in the current axes.subimage(x, y...) displays
an image using a nondefault spatial coordinate system.h = subimage(...) returns
a handle to an image object.


subimage(X, map)subimage(I)subimage(BW)subimage(RGB)subimage(x, y...)h = subimage(...)


load trees
[X2,map2] = imread('forest.tif');
subplot(1,2,1), subimage(X,map)
subplot(1,2,2), subimage(X2,map2)

Output / Return Value


Alternatives / See Also