Image Processing Toolbox    

Zooming in on a Region of an Image

The simplest way to zoom in on a region of an image is to use the zoom buttons provided on the figure window. To enable zooming from the command line, use the zoom command.When you zoom in, the figure window remains the same size, but only a portion of the image is displayed, at a higher magnification. (zoom works by changing the axis limits; it does not change the image data in the figure.)

Once zooming in is enabled, there are two ways to zoom in on an image:

  1. Single mouse click: click on a spot in the image by placing the cursor on the spot and the pressing the left mouse button. The image is magnified and the center of the new view is the spot where you clicked.
  2. Click and drag the mouse: select a region by clicking on the image, holding down the left mouse button, and dragging the mouse. This creates a dotted rectangle. When you release the mouse button, the region enclosed by the rectangle is displayed with magnification.

Zooming In or Out With the Zoom Buttons

The zoom buttons in the MATLAB figure enable you to zoom in or out on an image using your mouse.

To zoom in, click the "magnifying glass" button with the plus sign in it. There are two ways to zoom in on an image after selecting the zoom in button. See Zooming in on a Region of an Image above.

To zoom out, click the "magnifying glass" button with the minus sign in it. Click your left mouse button over the spot in the image you would like to zoom out from.

Zooming In or Out from the Command Line

The zoom command enables you to zoom in or out on an image using your mouse.

To enable zooming (in or out), type

There are two ways to zoom in on an image. See Zooming in on a Region of an Image above.

To zoom out, click on the image with the right mouse button. (If you have a single-button mouse, hold down the Shift key and click.)

To zoom out completely and restore the original view, enter

To disable zooming, enter


 Setting the Preferences for imshow Texture Mapping