Open Image Viewer app
The imtool
function opens the Image Viewer app. The app presents an integrated environment for displaying
images and performing common image processing tasks.
Image Viewer provides all the image display capabilities of imshow
, which optimizes figure, axes, and image object property settings
for image display. Image Viewer also provides access to several tools for
navigating and exploring images, such as the Pixel Region tool, Image Information tool,
and the Adjust Contrast tool.
imtool
opens the Image Viewer app in an empty
state. Use the File menu options Open or Import from
Workspace to choose an image for display.
imtool(
displays the grayscale image
I
)I
in the Image Viewer app, using the default
display range of the image data type.
imtool(
displays the grayscale image I
,range
)I
in the Image Viewer
app, specifying the display range as range
. The app clips pixel
values outside the display range to black or white and displays pixel values within
the display range as intermediate shades of gray. The app uses the default number of
gray levels.
imtool(
displays the truecolor image
RGB
)RGB
in the Image Viewer app.
imtool(
displays the binary image
BW
)BW
in the Image Viewer app. Pixel values of
0
display as black; pixel values of 1
display as white.
imtool(
displays the image
contained in the graphics file filename
)filename
in the Image
Viewer.
imtool(___,
displays the image, specifying parameters and corresponding values that control
various aspects of the image display.Name,Value
)
returns hfigure
= imtool(___)hfigure
, a handle to the figure created by the
Image Viewer app.
imtool close all
closes all open instances of Image
Viewer.
Display a color image from a file.
imtool('board.tif')
Display an indexed image.
[X,map] = imread('trees.tif');
imtool(X,map)
Display a grayscale image.
I = imread('cameraman.tif');
imtool(I)
Display a grayscale image, adjusting the display range.
h = imtool(I,[0 80]); close(h)
For grayscale images having integer types, the default display range is
[intmin(class(I)) intmax(class(I))]
.
For grayscale images of class single
or
double
, the default display range is [0
1]
. If the data range of a single
or
double
image is much larger or smaller than the default
display range, you might need to experiment with setting the display range to
see features in the image that would not be visible using the default display
range.
You can access Image Viewer through the Apps tab. Navigate to the Image Processing and Computer Vision group and select Image Viewer.
You can close a specific Image Viewer specified by the handle
hfigure
by using the command
close(hfigure)
.
imageinfo
| imcontrast
| imoverview
| impixelregion
| imshow
| iptprefs