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

4 Displaying and Exploring Images

Image Display and Exploration Overview

The Image Processing Toolbox software includes two display functions, imshow and imtool. Both functions work within the Handle Graphics architecture: they create an image object and display it in an axes object contained in a figure object.

imshow is the toolbox’s fundamental image display function. Use imshow when you want to display any of the different image types supported by the toolbox, such as grayscale (intensity), truecolor (RGB), binary, and indexed. For more information, see “Displaying Images Using the imshow Function” on page 4-4. The imshow function is also a key building block for image applications you can create using the toolbox modular tools. For more information, see .“Build Interactive Tools”

The other toolbox display function, imtool, launches the Image Tool, which presents an integrated environment for displaying images and performing some common image-processing tasks. The Image Tool provides all the image display capabilities of imshow but also provides access to several other tools for navigating and exploring images, such as scroll bars, the Pixel Region tool, the Image Information tool, and the Adjust Contrast tool. For more information, see “Using the Image Tool to Explore Images” on page 4-11.

In general, using the toolbox functions to display images is preferable to using MATLAB image display functions image and imagesc because the toolbox functions set certainHandle Graphics properties automatically to optimize the image display. The following table lists these properties and their settings for each image type. In the table, X represents an indexed image, I represents

a grayscale image, BW represents a binary image, and RGB represents a truecolor image.

Note Both imshow and imtool can perform automatic scaling of image data. When called with the syntax imshow(I,'DisplayRange',[]), and similarly for imtool, the functions set the axes CLim property to [min(I(:)) max(I(:))]. CDataMapping is always scaled for grayscale images, so that the value min(I(:)) is displayed using the first colormap color, and the value max(I(:)) is displayed using the last colormap color.

4-2

Image Display and Exploration Overview

 

Handle

 

 

 

 

 

 

 

Graphics

Indexed

Grayscale

 

Truecolor

 

 

Property

Images

Images

 

Binary Images

Images

 

 

CData (Image)

Set to the data in

Set to the data in

Set to data in BW

Set to data in RGB

 

 

 

X

I

 

 

 

 

 

CDataMapping

Set to 'direct'

Set to 'scaled'

Set to 'direct'

Ignored when

 

 

(Image)

 

 

 

 

CData is 3-D

 

 

CLim (Axes)

Does not apply

double:

[0 1]

Set to [0 1]

Ignored when

 

 

 

 

uint8: [0 255]

 

CData is 3-D

 

 

 

 

uint16:

[0

 

 

 

 

 

 

65535]

 

 

 

 

 

Colormap

Set to data in map

Set to grayscale

Set to a grayscale

Ignored when

 

 

(Figure)

 

colormap

colormap whose

CData is 3-D

 

 

 

 

 

 

values range

 

 

 

 

 

 

 

from black to

 

 

 

 

 

 

 

white

 

 

4-3

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