chapter 7 template filters image analysis a. dermanis

13
CHAPTER 7 CHAPTER 7 Template Filters Template Filters IMAGE ANALYSIS IMAGE ANALYSIS A. Dermanis

Upload: melanie-shepherd

Post on 23-Dec-2015

226 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

CHAPTER 7CHAPTER 7

Template FiltersTemplate Filters

IMAGE ANALYSISIMAGE ANALYSIS

A. Dermanis

Page 2: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

gij = fi–1,j–1 h–1,–1 + fi–1,j h–1,0 + fi–1,j+1 h–1,1 +

+ fi,j–1 h0,–1 + fi,j h0,0 + fi,j+1 h0,1 +

+ fi+1,j–1 h1,–1 + fi+1,j h1,0 + fi+1,j+1 h1,1

gij = fi–1,j–1 h–1,–1 + fi–1,j h–1,0 + fi–1,j+1 h–1,1 +

+ fi,j–1 h0,–1 + fi,j h0,0 + fi,j+1 h0,1 +

+ fi+1,j–1 h1,–1 + fi+1,j h1,0 + fi+1,j+1 h1,1

Moving templates for image filtering Moving templates for image filtering

The discrete convolution process in template filtering

A. Dermanis

Page 3: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

Typical template dimensions

Non-square templates viewed as special cases of square ones

A. Dermanis

Page 4: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

localized gij = hi,j;k,m fkm k=i–p m=j–p

i+p j+p

Template filters = Localized position-invariant linear transformations of an image

Using a (p+1)(p+1) templateUsing a (p+1)(p+1) template

linear gij = hi,j;k,m fkm k m

position-invariant hi,j;k,m = hk–i,m–j

gij = hk–i,m–j fkm k m

A. Dermanis

Page 5: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

Template filters = Localized position-invariant linear transformations of an image

renamed (i = 0, j = 0, k = k, m = m)

Combination of all properties

gij = hk–i,m–j fkm k=i–p m=j–p

i+p j+p

k = k – i

m = m – j

gij = hk,m fi+k,j+m k = –p m = –p

p p

g00 = hk,m fk,m k = –p m = –p

p p

A. Dermanis

Page 6: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

Template filters = Localized position-invariant linear transformations of an image

renamed

j–1 j j+1

i+1i

i–1

hij

fij

g00 = h–1,–1 f–1,–1 + h –1,0 f–1,+1 + h –1,1 f–1,+1 +

+ h0,–1 f0,–1 + h0,0 f0,0 + h0,+1 f0,+1 +

+ h+1,–1 f+1,–1 + h+1,0 f+1,0 + h+1,+1 f+1,+1

g00 = h–1,–1 f–1,–1 + h –1,0 f–1,+1 + h –1,1 f–1,+1 +

+ h0,–1 f0,–1 + h0,0 f0,0 + h0,+1 f0,+1 +

+ h+1,–1 f+1,–1 + h+1,0 f+1,0 + h+1,+1 f+1,+1

g00 = hk,m fk,m k = –p m = –p

p p

A. Dermanis

Page 7: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

Examples

homogeneous areas are set to zerohigh values emphasize high frequencies

fkm = C

g00 = hk,m C = 0 k = –p m = –p

p p

hk,m = 0 k = –p m = –p

p p

Examples

1

25

1

9

homogeneous (low frequency) areas preserve their value

fkm = C

g00 = hk,m C = C k = –p m = –p

p p

1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1

1 1 1 1 2 1

1 8 1 2 4 2

1 1 1 1 2 1

High-pass filtersHigh-pass filters

hk,m = 1 k = –p m = –p

p p

Low-pass filtersLow-pass filters

A. Dermanis

Page 8: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

An example of low pass filters: The original band 3 of a TM image is undergoing low pass filtering by moving mean templates with dimensions 33 and 55

An example of low pass filters: The original band 3 of a TM image is undergoing low pass filtering by moving mean templates with dimensions 33 and 55

Original

Moving mean 33 Moving mean 55

A. Dermanis

Page 9: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

An example of a high pass filter:The original image is undergoing high pass filtering with a 33 template,which enhances edges, best viewed as black lines in its negative

An example of a high pass filter:The original image is undergoing high pass filtering with a 33 template,which enhances edges, best viewed as black lines in its negative

Original

high pass filtering 33 high pass filtering 33 (negative)

A. Dermanis

Page 10: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

evaluation

Local interpolation and template formulationLocal interpolation and template formulation

interpolation

Templates expressing linear operatorsTemplates expressing linear operators

fkm f(x, y)

A

g(x, y)g(0, 0)

gij

hkm fkmk, m

A. Dermanis

Page 11: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

Original (TM band 4)

Laplacian 99 Laplacian 1313 Laplacian 1717

Examples of Laplacian filters with varying template sizes Examples of Laplacian filters with varying template sizes

The Laplacian operator

2 2

x2 y2A = = +

A. Dermanis

Page 12: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

Original (TM band 4)

Laplacian 55 Original + Laplacian 55

Examples of Laplacian filters with varying template sizes Examples of Laplacian filters with varying template sizes

A. Dermanis

Page 13: CHAPTER 7 Template Filters IMAGE ANALYSIS A. Dermanis

The Roberts and Sobel filters for edge detection The Roberts and Sobel filters for edge detection

Original (TM band 4) Roberts Sobel

Roberts filter Sobel filter

0 0 0

0 1 0

0 0 -1

0 0 0

0 0 1

0 -1 0

X Y

-1 0 1

-2 0 2

-1 0 1

-1 -2 -1

0 0 0

1 2 1

X Y

X 2+Y

2 X 2+Y

2

A. Dermanis