Image Processing: Local Operators

... sum of the pixels in the neighborhood of correponding input pixel. ▫ the matrix containing these weights is called convolution kernel or convolution mask.
2MB taille 173 téléchargements 710 vues
Image Processing: Local Operators

Local operators Convolutions Smooting and Bluring Edge detection Sharpening Non Linear filters

Image processing operations ƒ

Classification of image processing operations ƒ Point operation ƒ Local operation ƒ Global operation

ƒ

A operator is local if each pixel in the result image depends only on this pixel and its neighborhood in the source image

(x,y) V(x,y)

© 2004 Rolf Ingold, University of Fribourg

Shift-invariant operator ƒ

An local operator φ is said shift-invariant if it has the following property

J [ x, y ] = φ( I [ x, y ]) ⇒ J [ x − x0 , y − y0 ] = φ( I [ x − x0 , y − y0 ]) ƒ

A shift invariant local operator can be characterized by a function f such as

J [ x, y ] = f ({I [u , v]}[u , v ]∈V [ x , y ] )

© 2004 Rolf Ingold, University of Fribourg

Linear operators ƒ

An operator φ is said linear if it has the following property

φ(a.I + b.J ) = a.φ( I ) + b.φ( J ) ƒ

As special cases

φ(I + J ) = φ( I ) + φ( J ) φ(aI ) = aφ( I )

© 2004 Rolf Ingold, University of Fribourg

Convolution in continuous space ƒ

The convolution of two bidimensional signals is defined as follows ƒ in a 1D continuous space

f ( x) ⊗ g ( x) =



+∞

−∞

f (u ) g ( x − u )du

ƒ example f(x)

g(x)

1

f(x) *g(x) 1

1

x

x 0

0

x 0

ƒ in a 2D continuous space

f ( x, y ) ⊗ g ( x , y ) =

+∞ +∞

∫ ∫ −∞

© 2004 Rolf Ingold, University of Fribourg

−∞

f (u , v) g ( x − u , y − v) dudv

Convolution in discrete space ƒ

The convolution of two discrete signals is defined as follows ƒ in the 1D case

(f

⊗ g )[ x] =

∑u = −∞ f [u]g[ x − u] +∞

ƒ in the 2D case

(f ƒ

⊗ g )[ x, y ] =

∑u = −∞ ∑v = −∞ f [u, v]g[ x − u, y − v] +∞

+∞

The convolution can be understood as a sum of shift and multiply operations

© 2004 Rolf Ingold, University of Fribourg

Convolution kernel ƒ

ƒ

In digital image processing, convolution based operators are usually defined on windows ƒ centered at origin [0,0] ƒ bounded to [-m,+m]×[-n,+n] The convolution of an image I by a kernel h is expressed as

(k ⊗ I )[ x, y ] = ∑u = − m ∑v = − n k[u, v]I [ x − u, y − v] +m

+n

ƒ the output pixel value is the weighted sum of the pixels in the neighborhood of correponding input pixel ƒ the matrix containing these weights is called convolution kernel or convolution mask ⎡ k[− m,−n] ⎢ M ⎢ k = ⎢ k[− m,0] ⎢ M ⎢ ⎣⎢k[− m,+ n]

© 2004 Rolf Ingold, University of Fribourg

K k[0,−n] K k[ + m,−n]⎤ ⎥ O M N M ⎥ K k[0,0] K k[ + m,0] ⎥ ⎥ N M O M ⎥ K k[0,+ n] K k[+ m,+ n]⎥⎦

Convolution at the border ƒ ƒ ƒ

The convolution of an image I with dimension w×h is well defined in a domain (w-m)×(h-n) What values should be assigned to I[x,y] for x