Image Processing Toolbox User's Guide Previous page   Next Page

Exporting the Image to the Workspace

To export the image displayed in the Image Tool to the MATLAB workspace, you can use the Export to Workspace option on the Image Tool File menu. In the dialog box, shown below, you specify the name you want to assign to the variable in the workspace.

Export Image to Workspace Dialog Box

You can also use the getimage function to bring image data from the Image Tool into the MATLAB workspace.

The getimage function retrieves the image data (CData) from the current Handle Graphics image object. Because, by default, the Image Tool does not make handles to objects visible, you must use the toolbox function imgca to get a handle to the image axes displayed in the Image Tool. For example,

assigns the image data from moon.tif to the variable moon if the figure window in which it is displayed is currently active.

Previous page  Importing Image Data from the Workspace Closing the Image Tool Next page

© 1994-2005 The MathWorks, Inc.