| Image Processing Toolbox™ | ![]() |
| On this page… |
|---|
Navigating an Image Using the Overview Tool Panning the Image Displayed in the Image Tool |
If an image is large or viewed at a large magnification, the Image Tool displays only a portion of the entire image, including scroll bars to allow navigation around the image. To determine which part of the image is currently visible in the Image Tool, use the Overview tool. The Overview tool displays the entire image, scaled to fit. Superimposed over this view of the image is a rectangle, called the detail rectangle. The detail rectangle shows which part of the image is currently visible in the Image Tool. You can change the portion of the image visible in the Image Tool by moving the detail rectangle over the image in the Overview tool.
Image Tool with Overview Tool

The following sections provide more information about using the Overview tool.
The Overview tool starts automatically when you start the Image Tool. For example, execute the following command.
imtool('moon.tif')You
can also start the Overview tool by clicking the Overview button
in the Image Tool toolbar or by selecting
the Overview option from the Tools menu in the Image Tool.
Start the Overview tool by clicking
the Overview button
in the Image Tool toolbar
or by selecting Overview from the Tools menu. The Overview tool opens in a separate
window containing a view of the entire image, scaled to fit.
The Image Tool opens the Overview tool, by default. If the Overview tool is already active, clicking the Overview button brings the tool to the front of the windows open on your screen.
Using the mouse, move the pointer into
the detail rectangle. The pointer changes to a fleur,
.
Press and hold the mouse button to drag the detail rectangle anywhere on the image. The Image Tool updates the view of the image to make the specified region visible.
By default, the color of the detail rectangle in the Overview tool is blue. You might want to change the color of the rectangle to achieve better contrast with the predominant color of the underlying image. To do this, right-click anywhere inside the boundary of the detail rectangle and select a color from the Set Color option on the context menu.
To get the current position and size of the detail rectangle, right-click anywhere inside it and select Copy Position from the context menu. You can also access this option from the Edit menu of the Overview tool.
This option copies the position information to the clipboard. The position information is a vector of the form [xmin ymin width height]. You can paste this position vector into the MATLAB workspace or another application.
You can print the view of the image displayed in the Overview tool. Select the Print to Figure option from the Overview tool File menu. See Printing Images for more information.
To change the portion of the image displayed in the Image Tool, you can use the Pan tool to move the image displayed in the window. This is called panning the image.
Click the Pan tool
button
in the toolbar or select Pan from
the Tools menu. When the Pan tool
is active, a checkmark appears next to the Pan selection in the menu.
Move the pointer over the image in the
Image Tool, using the mouse. The pointer changes to an open-hand shape
.
Press and hold the mouse button and drag
the image in the Image Tool. When you drag the image, the pointer
changes to the closed-hand shape
.
To turn off panning, click the Pan tool button again or click the Pan option in the Tools menu.
Note As you pan the image in the Image Tool, the Overview tool updates the position of the detail rectangle — see Navigating an Image Using the Overview Tool. |
To enlarge an image to get a closer look or shrink an image to see the whole image in context, use the Zoom buttons on the toolbar. (You can also zoom in or out on an image by changing the magnification — see Specifying the Magnification of the Image or by using the Ctrl+Plus or Ctrl+Minus keys. Note that these are the Plus(+) and Minus(-) keys on the numeric keypad of your keyboard.)
Click the appropriate magnifying glass button in the Image Tool toolbar or select the Zoom In or Zoom Out option in the Tools menu. When the Zoom tool is active, a checkmark appears next to the appropriate Zoom selection in the menu.

Move the pointer over the image you want to zoom in or out on, using the mouse. The pointer changes to the appropriate magnifying glass icon. With each click, the Image Tool changes the magnification of the image, centering the new view of the image on the spot where you clicked.
When you zoom in or out on an image, the magnification value displayed in the magnification edit box changes and the Overview window updates the position of the detail rectangle.
To leave zoom mode, click the active zoom button again to deselect it or click the Zoom option in the Tools menu.
To enlarge an image to get a closer look or to shrink an image to see the whole image in context, you can use the magnification edit box, shown in the following figure. (You can also use the Zoom buttons to enlarge or shrink an image. See Zooming In and Out on an Image in the Image Tool for more information.)
Image Tool Magnification Edit Box and Menu

To change the magnification of an image,
Move the pointer into the magnification edit box. The pointer changes to the text entry cursor.
Type a new value in the magnification edit box and press Enter. The Image Tool changes the magnification of the image and displays the new view in the window.
You can also specify a magnification by clicking the menu associated with the magnification edit box and selecting from a list of preset magnifications. If you choose the Fit to Window option, the Image Tool scales the image so that the entire image is visible.
![]() | Using the Image Tool to Explore Images | Getting Information about the Pixels in an Image | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |