You are here : matlabImage Processingimtool

imtool() - Image Processing

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(I) displays the grayscale
image I in the Image Viewer.imtool(I,[low high]) displays
the grayscale image I in the Image Viewer, specifying
the display range for I in the vector [low
high]. The value low (and any value less
than low) is displayed as black, the value high (and
any value greater than high) is displayed as white.
Values in between are displayed as intermediate shades of gray. The
Image Viewer uses the default number of gray levels. If you use an
empty matrix ([]) for [low high],
the Image Viewer uses [min(I(:)) max(I(:))]; the
minimum value in I is displayed as black, and the
maximum value is displayed as white.imtool(RGB) displays the
truecolor image RGB in the Image Viewer.imtool(BW) displays the
binary image BW in the Image Viewer. Pixel values
of 0 display as black; pixel values of 1 display
as white.imtool(X,map) displays the
indexed image X with colormap map in
the Image Viewer.imtool(filename) displays
the image contained in the graphics file filename in
the Image Viewer.  The file must contain an image that can be read
by imread or dicomread or a
reduced resolution dataset (R-Set) created by rsetwrite.
If the file contains multiple images, the first one is displayed.
The file must be in the current directory or on the MATLAB® path.hfigure = imtool(...) returns hfigure,
a handle to the figure created by the Image Viewer. close(Hfigure) closes
the Image Viewer.imtool close all closes
all open Image Viewers.imtool(...,param1,val1,param2,val2,...) displays
the image, specifying parameters and corresponding values that control
various aspects of the image display. The following table lists all imshow parameters.
Parameter names can be abbreviated, and case does not matter.ParameterValue
'Colormap'2-D, real, m-by-3 matrix specifying
the colormap to use for the figure's colormap property.
Use this parameter to view grayscale images in false color. If you
specify an empty colormap ([]), imtool ignores
this parameter. 
'DisplayRange'Two-element vector [LOW HIGH] that
controls the display range of a grayscale image. See the imtool(I,[low
high]) syntax for more details about how to set this parameter.Note:  

Including the parameter name is optional, except when the image
is specified by a filename. The syntax imtool(I,[LOW HIGH]) is
equivalent  to imtool(I,'DisplayRange',[LOW HIGH]).
However, the 'DisplayRange' parameter must be specified
when calling imtool with a filename, as in the
syntax imtool(filename,'DisplayRange',[LOW HIGH]).
'InitialMagnification'One of  two text strings: 'adaptive' or 'fit' or
a numeric scalar value that specifies the initial magnification used
to display the image.When set to 'adaptive',
the entire image is visible on initial display. If the image is too
large to display on the screen, the Image Viewer displays the image
at the largest magnification that fits on the screen.When
set to 'fit', the Image Viewer scales the entire
image to fit in the window.When set to a numeric value,
the value specifies the magnification as a percentage. For example,
if you specify 100, the Image Viewer displays the image at 100% magnification
(one screen pixel for each image pixel).  Note:  

When the image aspect ratio is such  that less than one pixel
would be displayed in either dimension at the requested magnification,
the Image Viewer issues a warning and displays the image at 100%.
 By default, the initial magnification parameter is set
to the value returned by iptgetpref('ImtoolInitialMagnification').


imtoolimtool(I)imtool(I,[low high])imtool(RGB)imtool(BW)imtool(X,map)imtool(filename)hfigure = imtool(...)imtool close allimtool(...,param1,val1,param2,val2,...)



Output / Return Value


Alternatives / See Also