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