Image Processing Toolbox | ![]() ![]() |
Displaying Images
In MATLAB, the primary way to display images is by using the image
function. This function creates a Handle Graphics® image object, and it includes syntax for setting the various properties of the object. MATLAB also includes the imagesc
function, which is similar to image
but which automatically scales the input data.
The Image Processing Toolbox includes an additional display routine called imshow
. Like image
and imagesc
, this function creates a Handle Graphics image object. However, imshow
also automatically sets various Handle Graphics properties and attributes of the image to optimize the display.
This section discusses displaying images using imshow
. In general, using imshow
for image processing applications is preferable to using image
and imagesc
. It is easier to use and in most cases, displays an image using one image pixel per screen pixel. (For more information about image
and imagesc
, see their pages in the MATLAB Function Reference or see the MATLAB graphics documentation.)
Note
One of the most common toolbox usage errors is using the wrong syntax of imshow for your image type. This chapter shows which syntax is appropriate for each type of image. If you need help determining what type of image you are working with, see Image Types in the Toolbox.
|
![]() | Terminology | Displaying Indexed Images | ![]() |