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

10 Morphological Operations

[X,map] = imread('spine.tif'); I = ind2gray(X,map);

Ifill = imfill(I,'holes'); imshow(I);figure, imshow(Ifill)

Finding Peaks and Valleys

Grayscale images can be thought of in three dimensions: the x- and y-axes represent pixel positions and the z-axis represents the intensity of each pixel. In this interpretation, the intensity values represent elevations, as in a topographical map. The areas of high intensity and low intensity in an image, peaks and valleys in topographical terms, can be important morphological features because they often mark relevant image objects.

For example, in an image of several spherical objects, points of high intensity could represent the tops of the objects. Using morphological processing, these maxima can be used to identify objects in an image.

This section covers these topics:

“Terminology” on page 10-27

“Understanding the Maxima and Minima Functions” on page 10-27

“Finding Areas of High or Low Intensity” on page 10-28

10-26

Morphological Reconstruction

“Suppressing Minima and Maxima” on page 10-30

“Imposing a Minimum” on page 10-32

Terminology

This section uses the following terms.

 

Term

Definition

 

 

global maxima

Highest regional maxima in the image. See the

 

 

 

entry for regional maxima in this table for more

 

 

 

information.

 

 

global minima

Lowest regional minima in the image. See the

 

 

 

entry for regional minima in this table for more

 

 

 

information.

 

 

regional maxima

Connected set of pixels of constant intensity

 

 

 

from which it is impossible to reach a point with

 

 

 

higher intensity without first descending; that is,

 

 

 

a connected component of pixels with the same

 

 

 

intensity value, t, surrounded by pixels that all

 

 

 

have a value less than t.

 

 

regional minima

Connected set of pixels of constant intensity

 

 

 

from which it is impossible to reach a point with

 

 

 

lower intensity without first ascending; that is,

 

 

 

a connected component of pixels with the same

 

 

 

intensity value, t, surrounded by pixels that all

 

 

 

have a value greater than t.

 

Understanding the Maxima and Minima Functions

An image can have multiple regional maxima or minima but only a single global maximum or minimum. Determining image peaks or valleys can be used to create marker images that are used in morphological reconstruction.

This figure illustrates the concept in 1-D.

10-27

10 Morphological Operations

Finding Areas of High or Low Intensity

The toolbox includes functions that you can use to find areas of high or low intensity in an image:

The imregionalmax and imregionalmin functions identify all regional minima or maxima.

The imextendedmax and imextendedmin functions identify regional minima or maxima that are greater than or less than a specified threshold.

The functions accept a grayscale image as input and return a binary image as output. In the output binary image, the regional minima or maxima are set to 1; all other pixels are set to 0.

For example, this simple image contains two primary regional maxima, the blocks of pixels containing the value 13 and 18, and several smaller maxima, set to 11.

10-28

Morphological Reconstruction

The binary image returned by imregionalmax pinpoints all these regional maxima.

B = imregionalmax(A)

You might want only to identify areas of the image where the change in intensity is extreme; that is, the difference between the pixel and neighboring pixels is greater than (or less than) a certain threshold. For example, to find only those regional maxima in the sample image, A, that are at least two units higher than their neighbors, use imextendedmax.

B = imextendedmax(A,2)

10-29

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