Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR07 / 2read / image processing toolbox guide.pdf
Скачиваний:
166
Добавлен:
18.03.2015
Размер:
18.08 Mб
Скачать

Using the Image Tool to Explore Images

Specifying the Colormap

A colormap is a matrix that can have any number of rows, but must have three columns. Each row in the colormap is interpreted as a color, with the first element specifying the intensity of red, the second green, and the third blue.

To specify the color map used to display an indexed image or a grayscale image in the Image Tool, select the Choose Colormap option on the Tools menu. This activates the Choose Colormap tool. Using this tool you can select one of the MATLAB colormaps or select a colormap variable from the MATLAB workspace.

When you select a colormap, the Image Tool executes the colormap function you specify and updates the image displayed. You can edit the colormap command in the Evaluate Colormap text box; for example, you can change the number of entries in the colormap (default is 256). You can enter your own colormap function in this field. Press Enter to execute the command.

When you choose a colormap, the image updates to use the new map. If you click OK, the Image Tool applies the colormap and closes the Choose Colormap tool. If you click Cancel, the image reverts to the previous colormap.

4-15

4 Displaying and Exploring Images

Choose from

MATLAB colormaps.

Specify colormap in the workspace.

Evaluate a colormap function.

Click OK to select the colormap and close

the dialog box.

Image Tool Choose Colormap Tool

4-16

Using the Image Tool to Explore Images

Importing Image Data from the Workspace

To import image data from the MATLAB workspace into the Image Tool, use the Import from Workspace option on the Image Tool File menu. In the dialog box, shown below, you select the workspace variable that you want to import into the workspace.

The following figure shows the Import from Workspace dialog box. You can use the Filter menu to limit the images included in the list to certain image types, i.e., binary, indexed, intensity (grayscale), or truecolor.

Image Tool Import from Workspace Dialog Box

4-17

Соседние файлы в папке 2read