Click here to load reader
Apr 24, 2018
Table of Content
Digital Image ProcessingImage Filtering
O. Le [email protected]
Univ. of Rennes 1http://www.irisa.fr/temics/staff/lemeur/
January 2, 2011
1
mailto:[email protected]://www.irisa.fr/temics/staff/lemeur/
Table of Content
1 Introduction
2 Point-to-point transformation
3 Linear ltering (neighborhoodoperator)
4 Non Linear ltering
5 Conclusion
2
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Introduction
1 Introduction
2 Point-to-point transformation
3 Linear ltering (neighborhoodoperator)
4 Non Linear ltering
5 Conclusion
3
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Introduction: image transformation
There exist 3 types of transformation:
Point to point transformation:The output value at a specic coordinateis dependent only on one input value butnot necessarily at the same coordinate;
Local to point transformation:The output value at a specic coordinateis dependent on the input values in theneighborhood of that same coordinate;
Global to point transformation:The output value at a specic coordinateis dependent on all the values in the inputimage.
Note that the complexity increases with the size of the considered neighborhood...
4
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Point-to-point transformation
1 Introduction
2 Point-to-point transformationSpatial coordinates-basedtransformationsPixel values-based transformations
3 Linear ltering (neighborhoodoperator)
4 Non Linear ltering
5 Conclusion
5
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Spatial coordinates-based transformations
Remark:
This section is composed of several pictures extracted fromhttp://eeweb.poly.edu/~onur/lectures/lectures.html.
Let im[x, y ] be an input image of size N N.
A spatial coordinates-based transformation, also called warping, aims at providing animage IM[k, l ] from the input image im[x, y ]:
IM[k, l ] = im[x(k, l), y(k, l)]
x(k, l) and y(k, l) are the transformations or the pixel warping functions. These functionsjust modify the spatial coordinates of a pixel not its value;
Special cases to take into consideration:
the new coordinates [x(k, l), y(k, l)] is out of the image IM. In this case,IM[k, l ] = 0;the new coordinates must be integers (Rounding operation, nearest integers...).
6
http://eeweb.poly.edu/~onur/lectures/lectures.html
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Transpose
The transpose tansformation is given by
x(k, l) = l
y(k, l) = k
7
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Vertical Flip
The vertical ip tansformation is given by
x(k, l) = N ky(k, l) = l
The horizontal ip tansformation is given by
x(k, l) = k
y(k, l) = N l
8
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Translation
The translation tansformation is given by
x(k, l) = k + Tk
y(k, l) = l + Tl
where Tk and Tl are the transalation values for the x-axis and the y-axis respectively.
In the example below, we have (Tl = 50)
IM[k, l ] = im[x(k, l), y(k, l)]
IM[k, l ] = im[k, l + Tl ]
Dierent transformations can be obtained depending on Tk and Tl values.
9
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Rotation
The rotation tansformation is given by
x(k, l) = (k x0)cos (l y0)sin + x0y(k, l) = (k x0)sin + (l y0)cos + y0
where [x0, y0] is the spatial coordinates of the center of the rotation and the angle.
Extracted from http://eeweb.poly.edu/ onur/lectures/lectures.html.
10
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Wave
x(k, l) = k
y(k, l) = l + sin( l)x(k, l) = k + sin( k)y(k, l) = l
and can be used to strengthen the eect.
11
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Warp and swirl
x(k, l) = k
y(k, l) =sign(l y0)
y0 (l y0)2 + y0
The swirl eect is a rotation but theangle of the rotation varies with thepixel distance from the center of theimage [x0, y0]:
d =
(k x0)2 + (l y0)2
=
512r
If r 0, is small...
12
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Glass eect
A glass eect is obtained by adding a small and random displacement to each pixel:
x(k, l) = k + (RAND(1, 1) 1/2) 10y(k, l) = l + (RAND(1, 1) 1/2) 10
Extracted from http://eeweb.poly.edu/ onur/lectures/lectures.html.
13
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Summary
All 2D linear transformations: [x
y
]=
[a b
c d
] [k
l
]Scale, rotation, mirror...
Properties:
Origin maps to origin;
Lines map to lines;
Ratios are preserved...
Ane transformations (linear transf. + translation):xyw
=a b cd e f0 0 1
klw
Properties:
Origin does not necessarily map to origin;
Lines map to lines;
Ratios are preserved...
14
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Summary
Ane transformations (linear transf. + translation):
Translation: xy1
=1 0 tx0 1 ty0 0 1
kl1
Scale: xy
1
=sx 0 00 sy 00 0 1
kl1
2D in-plane rotation: xy
1
=cos sin 0sin cos 0
0 0 1
kl1
15
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Pixel values-based transformations
Let im[x , y ] be an input image of size N N.
A pixel values-based transformation aims at providing an image IM[k, l ] from theinput image im[x , y ]:
IM[k, l ] = f (im[k, l ])
Noticed that the spatial coordinates of pixel are not modied. The function f isused to modify the pixel values.
The simplest one is the identity function: f (p) = p:
IM[k, l ] = f (im[k, l ])
IM[k, l ] = im[k, l ]
16
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Histogram
An image histogram is a graphical representation of the tonal distribution in a digitalimage. It plots the number of pixels for each tonal value.
Histogram gives information about the global distribution of an image.
Histogram plots the number of pixels in the image (vertical axis) with a particularbrightness value (horizontal axis).
(a) Original (b) Histogram (intensity)
17
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Histogram
(a) Original (b) Histogram (intensity)
(c) Original (d) Histogram (intensity)
18
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Histogram
High dynamic range in the last caseproviding the best quality.
From R.C. Gonzalez, R.E. Woods, Digital image processing.
19
IntroductionPoint-to-point transformation
Linear ltering (neighborhood operator)Non Linear ltering
Conclusion
Spatial coordinates-based transformationsPixel values-based transformations
Histogram equalization
The goal is to increase the global contrast of images, especially when the usable dataof the image is repr