a grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel...

66
A grey-level image may be seen as a topographic relief, where the grey level of a pixel is interpreted as its altitude in the relief. A drop of water falling on a topographic relief flows along a path to finally reach a local minimum. Intuitively, the watershed of a relief correspond to the limits of the adjacent catchment basins of the drops of water. Watershed transform Watershed of the gradient Watershed of the gradient (relief Relief of the gradient Gradient image Cardiac MRI image

Upload: christine-mcdowell

Post on 18-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

• A grey-level image may be seen as a topographic relief,

where the grey level of a pixel is interpreted as its altitude in the relief.

• A drop of water falling on a topographic relief flows along a

path to finally reach a local minimum.

• Intuitively, the watershed of a relief correspond to the

limits of the adjacent catchment basins of the drops of water.

Watershed transform

Watershed of the gradient

Watershed of the gradient (relief)

Relief of the gradient

Gradient image

Cardiac MRI image

Page 2: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 3: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 4: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 5: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 6: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 7: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 8: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 9: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 10: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 11: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 12: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 13: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Binary image objects can be described by a unit width skeleton. The skeleton is placed in the medial region of the object, has the same topology, and allows the evaluation of the spatial dimensions as well as of the orientation of the object and its subsets. Skeletonizing (or thinning) usually consists of two main steps:

1. Distance transform 2. Detection of the skeletal points

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 4 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0

Skeletonization

Page 14: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Skeleton by distance transforms

Maxima of distance transform

Page 15: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 16: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 17: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 18: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 19: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 20: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 21: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 22: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Distance Transform

Page 23: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Skeleton

Reconstruction: the original object can be reconstructed by given knowledge of the skeleton subsets Si(F), the SE K, and i:

Examples of skeleton: 0

( ( ) )n

i ii

F S F r K

Page 24: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 25: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 26: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 27: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 28: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 29: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 30: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 31: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 32: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 33: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

The Distance Transform on Curved Space (DTOCS)

Page 34: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 35: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Distance Transform on Curved Space (DTOCS)• Calculates minimal distances between 2 points along a curved

surface• Calculates minimal distances between areas and areas/points

on curved surface• Uses a 3x3 calculation kernel with different metrics:

• Chessboard• City block

• Is a gray-level extension to the Rosenfeldt-Pfaltz-Lay algorithm (which

calculates a distance transform for binary images)• Presented by Toivanen and Vepsäläinen in 1991 and 1993.• Applications:

• Texture feature extraction and classification (e.g. paper roughness) (Kuparinen and Toivanen 2006, 2007)

• Shortest distance calculations (Ikonen and Toivanen 2006)• Image compression

Page 36: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Weighted Distance Transform on Curved Space (WDTOCS)• Calculates minimal distances between 2 points along a curved

surface• Calculates minimal distances between areas and areas/points

on curved surface• Uses a 3x3 calculation kernel with different metrics:

• Chessboard• City block

• Measures the differences between adjacent pixels by their Euclidean

distance + (1 or 1,4 for the xy-surface displacement)• Presented by Toivanen and Vepsäläinen in 1991 and 1993.• Applications:

• Texture feature extraction and classification (e.g. paper roughness) (Kuparinen and Toivanen 2006, 2007)

• Shortest distance calculations (Ikonen and Toivanen 2006)• Image compression

Page 37: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Definition of theDistance TransformOn Curved Space(DTOCS)

Page 38: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

pne pn pne

pw pc pe

psw ps pse

The 3x3 kernel used in DTOCS algorithm

Page 39: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

pne pn pne

pw pc pe

psw ps pse

The 3x3 kernel used in DTOCS algorithm

Page 40: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

The Distance Transform on Curved Space (DTOCS)

Page 41: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 42: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original image Distance image after forward pass

Page 43: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Distance image after backward pass

Distance image after 2nd iteration

(= forward+backward pass second time)

Page 44: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 45: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original Lena image521 x 521 x 8 bits

Curves in which DTOCS distance > binary distance

Control points chosen along the curves

Page 46: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 47: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

(a) LWC (b) SC (c) Cardboard

(d) LWC (e) SC (f) Cardboard

Page 48: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 49: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Shortest route calculation with Route DTOCS.

Page 50: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original image

a

b

Page 51: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

a

b

Shortest route between a and b

Page 52: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Fig. 2. a) Original image, b) distance from source point, c) distance from destination point, d) sum of distance images, e) route by DTOCS, f) route by WDTOCS.

Page 53: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original labyrinth

Shortest routes by DTOCS

Page 54: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original labyrinth

Shortest routes by DTOCS

Page 55: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Fig. 3. a) Shortest routes from corner to corner of an ”eggbox” surface, b) 3D-visualization of the routes on the surface a)

a) b)

Page 56: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

x

f(x)

x

f(x)

Quantization Thresholding

Page 57: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original image Constant addition

Negative image

Addition + contrast strecthing

Histogram equalization

Page 58: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original image Range compression

Addition + contrast strecthing

Original image Contrast

stretching to [0, 128]

Histogram equalization

Page 59: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Filtering is an image processing operation where the value of a pixel depends on the values of its neighboring pixels.

Filtering

Page 60: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

f x w xi ii

1

9

Each of the pixels are processed separately with a predefined window (or template, or mask)

Filtering is an image processing operation where the value of a pixel depends on the values of its neighboring pixels.

Filtering

Weighted sum of the pixels inside the window is calculated using the weights given by a mask, see Figure 2.12.

The result of the sum replaces the original value in the processed image:

w1

w4

w7

w2

w5

w8

w3

w6

w9

Figure 2.12: General mask for filtering with a 3 x 3 window.

Page 61: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop
Page 62: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

In the case of border pixels, the part of the mask lying outside of the image is assumed to have the same pixel values as that of the border pixels, see Figure 2.13.

Note that the filtering is a parallel operation, i.e. the neighboring values used in the calculations are always taken from the original image, not from the processed image.

Figure 2.13: Example of filtering operation in the case of border pixel.

Page 63: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Low-pass filtering (or averaging filtering, or smoothing) reduces the high frequency components (or noise) in the image by averaging the pixel values over a small region (block). see Figure 2.14.

This reduces noise and makes the image generally smoother, especially near the edges. The level of smoothing can be changed by increasing the size of the window, see Figure 2.15.

-1

-1

-1

-1

8

-1

-1

-1

-1

1/9 1/9 1/9

1/9 1/9 1/9

1/9 1/9 1/9

Figure 2.14: Masks for low-pass (left) and high-pass filters (right).

Page 64: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

High-pass filtering is the opposite operation to low-pass filtering.

The low frequency components are eliminated and only the high frequency components in the image are retained.

The operation can be applied in image enhancement by adding the result of the filtering to the original image.

This is known as sharpening.

It enhances the pixels near edges and makes it easier to observe details in the image, see Figure 2.16.

The use of negative weights in the mask may result in negative values, thus the pixel values must be scaled back to [0, 255].

Page 65: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

Original image "airplane" (5125128)Smoothed by 3 x 3 averaging filter Smoothed by 5 x 5 averaging filter

Smoothed by 7 x 7 averaging filter Smoothed by 15 x 15 averaging filter

Page 66: A grey-level image may be seen as a topographic relief,topographic where the grey level of a pixel is interpreted as its altitude in the relief. A drop

The End