CHAPTER 7 IMAGE ANALYSIS Template Filters A. Dermanis
Moving templates for image filtering 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 The discrete convolution process in template filtering A. Dermanis
Typical template dimensions Non-square templates viewed as special cases of square ones A. Dermanis
gij = hi,j;k,m fkm hi,j;k,m = hk–i,m–j gij = hk–i,m–j fkm Template filters = Localized position-invariant linear transformations of an image 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 localized gij = hi,j;k,m fkm k=i–p m=j–p i+p j+p Using a (p+1)(p+1) template A. Dermanis
gij = hk–i,m–j fkm gij = hk,m fi+k,j+m g00 = hk,m fk,m Template filters = Localized position-invariant linear transformations of an image 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 renamed (i = 0, j = 0, k = k, m = m) g00 = hk,m fk,m k = –p m = –p p p A. Dermanis
Template filters = Localized position-invariant linear transformations of an image j–1 j j+1 i+1 i i–1 renamed hij g00 = hk,m fk,m k = –p m = –p p p 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 A. Dermanis
hk,m = 1 hk,m = 0 g00 = hk,m C = C g00 = hk,m C = 0 Low-pass filters High-pass filters hk,m = 1 k = –p m = –p p p hk,m = 0 k = –p m = –p p p homogeneous (low frequency) areas preserve their value fkm = C g00 = hk,m C = C k = –p m = –p p p homogeneous areas are set to zero high values emphasize high frequencies fkm = C g00 = hk,m C = 0 k = –p m = –p p p Examples 1 25 9 Examples 1 -1 1 -2 8 4 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 Original Moving mean 33 Moving mean 55 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 Original high pass filtering 33 high pass filtering 33 (negative) A. Dermanis
Templates expressing linear operators Local interpolation and template formulation fkm interpolation f(x, y) hkm fkm k, m A evaluation gij g(x, y) g(0, 0) A. Dermanis
2 2 A = = + x2 y2 The Laplacian operator 2 2 x2 y2 A = = + Examples of Laplacian filters with varying template sizes Original (TM band 4) Laplacian 99 Laplacian 1313 Laplacian 1717 A. Dermanis
Examples of Laplacian filters with varying template sizes Original (TM band 4) Laplacian 55 Original + Laplacian 55 A. Dermanis
The Roberts and Sobel filters for edge detection Roberts filter Sobel filter X 2+Y 2 X 2+Y 2 X Y X Y 1 -1 1 -1 -1 1 -2 2 -1 -2 1 2 Original (TM band 4) Roberts Sobel A. Dermanis