Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Kluwer - Handbook of Biomedical Image Analysis Vol

.2.pdf
Скачиваний:
102
Добавлен:
10.08.2013
Размер:
25.84 Mб
Скачать

322

Walter and Klein

(a) A color image

(b) The red channel

(c) The green channel

(d) The blue channel

Figure 7.4: A RGB representation of a color image.

one to exploit this interpretation of the reflected spectrum. A color image and its decomposition into the three channels, red, green, and blue, is shown in Fig. 7.4. Of course, the given interpretation holds only approximately: The red channel is not the spectral response to red illumination, but the red part of the spectral response to illumination with white light.

The RGB representation of a color fundus image is shown in Fig. 7.4. The red channel is relatively bright and the vascular structure of the choroid is visible. The retinal vessels are also visible but less contrasted than in the green channel (compare Fig. 7.4(b) with Fig. 7.4(c)). The blue channel is noisy and contains only few information. The vessels are hardly visible and the dynamic is very poor.

This phenomenon can be observed in all retinal images we have studied (about 200) with one difference: Sometimes, the blue channel contains information, sometimes, it does not. Indeed, the quality of the blue channel of the RGB

Analysis of Color Fundus Photos and Its Application to Diabetic Retinopathy

323

color space depends on the age of the patient and on the yellowing of the cornea; the cornea can be understood as a filter that screens out ultraviolet radiation. With the age, the cut-off frequency moves toward the blue, and even blue light can no longer pass.

This interpretation of the color content of fundus images privileges the use of the RGB color space, for the channels have a physical meaning. We have compared qualitatively the green channel of 30 fundus images with channels of other color spaces (HSV , HL S, Lab, Luv, principal components) and for all images, the green channel was better contrasted than any other channel (at least concerning all blood-containing features). Another advantage of the use of the green channel is that the choroidal vessels do not appear at all, whereas they do appear in the luminance channel for instance, for it is a combination of the three channels R, G, and B. This is why, we work mainly on the green channel.

7.3 Basic Morphological Operators

Mathematical morphology is a nonlinear image-processing technique. The interested reader may see [5] for an exhaustive discussion and [6] for a comprehensive introduction.

The basic operators presented in this chapter deal with two-dimensional discrete images (defined on E Z2). Binary images are defined as subsets of E and gray scale images as functions f : E T , with T = {tmin, . . . , tmax} the set of gray levels.

7.3.1 Erosion and Dilation

Many operators in mathematical morphology are based on the use of a small “test-set” B called structuring element (SE). Its shape and size can be chosen in accordance with the segmentation or filtering task.

In order to calculate the morphological erosion of a binary image A, we test for each point x if the structuring element centered in x fits completely into A. If this is the case, x belongs to the eroded set ε A. The dilation can be seen as an erosion of the background.

324

 

Walter and Klein

 

 

 

 

 

 

(a) Original

(b) Erosion

(c) Dilation

Figure 7.5: Erosion and dilation with a circular SE of a retinal image (detail).

The gray level dilation/erosion substitutes the value

f (x) by the maxi-

mum/minimum of f for all the pixels contained in the translated SE Bx:

ε

B

 

min

f

(

x + b

)

 

 

( f ) (x) = b B

 

 

 

 

 

2δ

 

( f )3

(x) = b B

f

(

x + b

)

(7.1)

2

B

3

max

 

 

 

 

In Fig. 7.5, the effect of these operations are shown. We see that the erosion enlarges dark details and reduces bright ones and the dilation enlarges bright details and reduces dark ones.

7.3.2 Opening and Closing

Morphological openings γ B and closings φ B are the consecutive application of erosion and dilation:

 

B

 

˘

 

B

 

 

γ

(·) = δ

B

ε

(·)

 

 

˘

 

(7.2)

φ B

(·) = εBδ B(·)

˘ = {− }

with B b the transposed structuring element.

In order to understand the behavior of gray scale openings and closings, it is useful to consider the image f as a topographic surface: Pixels with low gray-levels correspond to valleys, pixels with high gray-levels correspond to mountains. A morphological opening removes all bright features that cannot contain the structuring element; “it razes the elevations.” A morphological closing removes all dark features that cannot contain the structuring element; “it fills the depressions in the surface.” The opening and closing of a retinal image are shown in Fig. 7.6: The opening removes the bright patterns (exudates) without enlarging the dark ones (Fig. 7.6(b)). The closing removes the dark patterns

Analysis of Color Fundus Photos and Its Application to Diabetic Retinopathy

325

 

 

 

 

 

 

 

 

(a) Original

(b) Opening

(c) Closing

Figure 7.6: Opening and closing of a retinal image (detail) with a circular SE.

(hemorrhages, vessels, microaneurysms) without enlarging the bright ones; but the shape of the bright patterns are altered, the spaces between the exudates are also filled (Fig. 7.6(c)).

Furthermore, any increasing, idempotent, and antiextensive transformation is called algebraic opening. Any increasing, idempotent, and extensive transformation is called algebraic closing.

7.3.3 The Morphological Reconstruction

In order to avoid these alterations of contours, like the ones caused by openings and closings shown in Fig. 7.6, the morphological reconstruction can be used.

The morphological reconstruction by dilation works with two images: a marker f and a mask g. The marker image is dilated, then the point-wise minimum with g is calculated, then the result is dilated once again, and so on. This process is iterated until idempotence. Let δg(1) f = δ B f g. The morphological reconstruction can then be written as:

Rg ( f ) = δg(∞)( f ) with δg(n)( f ) = δg(1) 2δg(n−1)( f )3

(7.3)

With εg(1) f = εB f g, the reconstruction by erosion can be defined analogously:

Rg ( f ) = εg(∞)( f ) with εg(n)( f ) = εg(1) 2εg(n−1)( f )3

(7.4)

7.3.4 The Watershed Transformation

One of the most powerful tools for image segmentation in mathematical morphology is the watershed transformation [7]. A gray-level image f is interpreted as a topographic surface and a flooding process is simulated starting from the

326

Walter and Klein

(a) Starting with

(b) Two lakes

(c)

Watershed

the local minima

meeting

transformation

Figure 7.7: The watershed transformation.

local minima (“sources”). The flooding level s is the same for the whole image; all pixels with a gray level value lower than s belong therefore to a “lake” (see Fig. 7.7(a)). When two lakes meet, a “wall” is built between the two lakes, i.e., the pixel where the two lakes meet forms part of the watershed line W S( f ) (see Fig. 7.7(b)). The whole image is flooded in this way giving an image that contains the watershed line W S( f ) and as many regions as local minima in the original image f (see Fig. 7.7(c)). These regions are called catchment basins

C Bi in analogy to their topographic interpretation.

The presence of many minima dues to the noise present in real images results in over-segmentation. The number of minima can be reduced before calculating the watershed transformation by means of the morphological reconstruction. Therefore, we calculate a marker image m, which takes the value f (x) for all the “marked pixels” and tmax elsewhere (see Fig. 7.8(a)). Then, we calculate the reconstruction by erosion R f (m), i.e., we remove (“fill”) all not marked minima (Fig. 7.8(a)). For this modified image, the watershed transformation gives a more persistent result (Fig. 7.8(b)).

marker

image f

reconstruction

(a) An image f, a marker m (in gray),

(b) The watershed transformation

and the reconstruction by erosion

Figure 7.8: The watershed transformation controlled by a marker m.

Analysis of Color Fundus Photos and Its Application to Diabetic Retinopathy

327

7.4Contrast Enhancement and Correction of Nonuniform Illumination

There are three systematic problems that occur in nearly all segmentation tasks of color fundus images:

Nonuniform illumination

Poor contrast

Noise

For the attenuation of noise, we cannot propose filters that are applicable in general, because the exigency on such filters depends on the segmentation task. If big features are to be detected (e.g. the macula), strong filters can be used whereas algorithms dedicated to the detection of small details (e.g. microaneurysms) must rely on filters that preserve even small dark details.

In this section, we present an algorithm for contrast enhancement and shade correction. First, we propose a simple global contrast enhancement operator. Applying this operator locally enhances the contrast and corrects nonuniform illumination in one step.

7.4.1 Polynomial Contrast Enhancement

Let f : E T be a gray-level image with T = {tmin, . . . , tmax} R a set of rational numbers. Let U = {umin, . . . , umax} R be a second set of rational numbers. An application

: T U

u = (t)

is called gray-level transformation.

For convenience, the gray-level transformation is constructed in such a way that it assigns 12 (umin + umax) to the mean value µt of the original image f . Instead of t and u, we consider in the following the variables τ and ν defined by:

τ = t µt

 

 

ν = u

1

(umin + umax)

(7.5)

2

∂u ∂t

328

Walter and Klein

A polynomial gray-level transformation can then be defined as follows:

ν

=

 

(τ )

=

a1

· (τ τmin)r + b1

if

τ ≤ 0

(7.6)

 

 

 

a2

· (τ τmax)r + b2

if

τ ≥ 0

 

with the parameters r, a1, a2, b1, and b2. The parameter r can be chosen freely, the other parameters are determined in order to assure that the transformation

is continuous and that the resulting image covers the whole gray-level range (from umin to umax). These conditions can be expressed by

(τmin)

= νmin

 

lim (τ )

=

0

 

τ →0

 

 

lim (τ )

=

0

 

τ →0+

 

 

(τmax)

= νmax

(7.7)

and with Eq. (7.6) we obtain for the parameters a1, a2, b1, and b2:

 

a

 

=

 

 

νmin

 

 

 

=

 

21 (umax umin)

 

 

 

1

 

 

(−τmin)r

 

 

 

(µt tmin)r

 

 

 

 

a

 

=

 

 

νmax

 

=

 

21 (umax umin)

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(−τmax)r

 

 

 

(µt tmax)r

 

 

 

b1 = νmin =

1

(umin umax)

 

 

 

 

 

2

 

 

 

 

 

b2 = νmax =

1

 

(umax umin)

 

 

 

(7.8)

 

 

 

 

 

 

 

 

 

2

 

 

 

 

and finally, for u = (t):

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

u = (t) =

21 (umax umin )

 

 

 

 

 

 

r

 

 

 

 

(7.9)

 

 

21

(umax umin )

 

 

 

 

 

 

 

 

r

 

 

 

 

 

 

 

 

 

(µt tmin )r

· (t tmin)

+ umin

if

t µt

 

 

(µt

 

tmax )r

 

 

 

 

(t

 

 

 

tmax)

 

umax

if

t > µt

 

 

 

 

 

 

 

 

 

 

·

 

 

 

+

 

 

 

 

The corresponding graph is shown in the Fig. 7.9 for different µt . The resulting transformation is not symmetric to the point (µt , 12 (umax + umin)).

With r, we can control the strength of the contrast enhancement. For µt =

12 (tmin + tmax), we obtain a linear contrast stretching operator for r = 1. For r → ∞, we obtain a threshold operation with the thresh µt .

If this operator is applied to the whole image as a global contrast operator, the result is not satisfying due to the nonuniform illumination. In fact, the proposed gray-level transformation does not enhance the contrast for any subset of T , but only for subsets for which > 1. For instance, the contrast of a dark detail situated in a dark region may even be attenuated.

Analysis of Color Fundus Photos and Its Application to Diabetic Retinopathy

329

u

umax

12 (umax + umin )

umin

tmin

tmax

t

t

Figure 7.9: The graph of the gray level transformation for different µt .

7.4.2 Contrast Enhancement and Shade Correction

In order to enhance the contrast all over the image independently from local illumination changes, we propose a shade correction operator based on the gray-level transformation shown in the preceding section.

Shade correction: A shade correction operator tries to remove the background information from an image. This is done by calculating a background approximation (for example with a low pass filter) and by subtracting it from the image. In order to avoid negative values, a constant is usually added:

[SC( f )](x) = f (x) − [ A( f )](x) + c

(7.10)

In the corrected image, the gray-level values depend only on the difference between the original value and the background approximation.

The local contrast enhancement operator : In order to obtain a shade correction operator, which also enhances the contrast, we apply the gray-level transformation from Eq. (7.9) locally, i.e. we substitute the global mean µt by a local background approximation.

One possibility is to calculate the mean value of f within a window W centered in the pixel x:

 

1

ξ

 

µtW (x) = NW

(7.11)

f (ξ )

 

 

W (x)

 

In this way, a contrast operator is obtained for which the transformation parameters depend on the mean value of the image in a window of a certain size. Hence, it is a shade correction and contrast-enhancement operator.

330

Walter and Klein

However, for pixels close to bright features, the background approximation may be biased by blurred bright objects. Indeed, we observe a “darkening” close to bright objects as the papilla or exudates (see Fig. 7.10b). This darkening is a real problem for segmentation algorithms, because these regions may then be confused with vessels, hemorrhages, or microaneurysms. Therefore, we propose to calculate the local mean value on a filtered image, where all these bright features have been removed. We have seen that the morphological opening removes bright features from an image (see section 7.3). However, we found it advantageous to apply an area opening γλa [8] rather than a morphological one. Instead of using a SE, γλa removes all bright objects if their area (number of pixels) is smaller than λ. The shade-correction operator can then be written as

[SC( f )] (x)

 

 

1 λ

 

 

 

 

 

 

21 (umax umin )

 

 

=

2 (umax

umin )

 

 

 

W

 

r

 

 

 

(µWa (x) tmin )r

 

 

(µ a (x)

 

tmax )

 

 

 

γ

 

 

 

 

 

 

 

γλ

 

 

 

 

 

 

 

 

 

 

 

 

·(t tmin)r + umin

·(t tmax)r + umax

if t µWa (x)

γλ

(7.12)

if t µWa (x)

γλ

The results obtained by the application of this operator are shown in Fig. 7.10 and Fig. 7.11.

(a) Detail of the green channel of a fundus image containing hard exudates

(b) The shade correction operator with the local mean value as background approximation

(c) The final shade correction and contrast enhancement operator

Figure 7.10: The effect of filtering of the background approximation.

Analysis of Color Fundus Photos and Its Application to Diabetic Retinopathy

331

(a) Original image

(b) The result for r = 3

Figure 7.11: A result for shade correction and contrast enhancement.

The shade correction of retinal images is a prerequisite of several algorithms, for example, the detection of microaneurysms shown in section 7.6.1 and the detection of vessels shown in the next section.

7.5The Detection of Anatomical Structures in Color Fundus Images

The main anatomical features in fundus photographs are—as it has been explained in section 7.1—the vascular tree, the optic disk, and the macula. In the following subsections we present methods for the detection of the vessels and the papilla. An algorithm for the localization of the macula can be found in [9].

7.5.1The Detection of the Vascular Tree by Means of the Watershed Transformation

In this section, we present a method for the detection of the vascular tree in color images of the human retina. This algorithm is quite general; only few information specific for retinal images is used. It can therefore be used for the extraction of elongated features in other types of images.

7.5.1.1 Motivation

Detecting the vascular tree is essential for the analysis of fundus images. The structure of the vascular tree gives useful information for other feature or lesion