ee 4780: introduction to computer vision
DESCRIPTION
EE 4780: Introduction to Computer Vision. Linear Systems. Review: Linear Systems. We define a system as a unit that converts an input function into an output function. Independent variable. System operator. Linear Systems. Let. - PowerPoint PPT PresentationTRANSCRIPT
EE 4780: Introduction to Computer Vision
Linear Systems
Bahadir K. Gunturk 2
Review: Linear Systems
We define a system as a unit that converts an input function into an output function.
System operatorIndependent variable
Bahadir K. Gunturk 3
Linear Systems
Then the system H is called a linear system.
where fi(x) is an arbitrary input in the class of all inputs {f(x)}, and gi(x) is the corresponding output.
Let
If
A linear system has the properties of additivity and homogeneity.
Bahadir K. Gunturk 4
Linear Systems
for all fi(x) {f(x)} and for all x0.
The system H is called shift invariant if
This means that offsetting the independent variable of the input by x0 causes the same offset in the independent variable of the output. Hence, the input-output relationship remains the same.
Bahadir K. Gunturk 5
Linear Systems The operator H is said to be causal, and hence the system described
by H is a causal system, if there is no output before there is an input. In other words,
A linear system H is said to be stable if its response to any bounded input is bounded. That is, if
where K and c are constants.
Bahadir K. Gunturk 6
Linear Systems
(a)
ax
(x-a)
A unit impulse function, denoted (a), is defined by the expression
Bahadir K. Gunturk 7
Linear Systems The response of a system to a unit impulse function is called the impulse response of the system.
h(x) = H[(x)]
Bahadir K. Gunturk 8
Linear Systems
If H is a linear shift-invariant system, then we can find its reponse to any input signal f(x) as follows:
This expression is called the convolution integral. It states that the response of a linear, fixed-parameter system is completely characterized by the convolution of the input with the system impulse response.
Bahadir K. Gunturk 9
Linear Systems
[ ]* [ ] [ ] [ ]m
f n h n f m h n m
Convolution of two functions is defined as
In the discrete case
( )* ( ) ( ) ( )f x h x f h x d
Bahadir K. Gunturk 10
Linear Systems
1 2
1 2 1 2 1 2 1 1 2 2[ , ]** [ , ] [ , ] [ , ]m m
f n n h n n f m m h n m n m
1 2[ , ]h n n is a linear filter.
In the 2D discrete case
Bahadir K. Gunturk 11
Convolution Example
From C. Rasmussen, U. of Delaware
1 -1 -1
1 2 -1
1 1 12 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
Rotate
1-1-1
12-1
111
h
f
Bahadir K. Gunturk 12
Convolution Example
From C. Rasmussen, U. of Delaware
Step 1
3
2
1
2
2
1
3
2
32
21
22
32 5
3
2
1
2
2
1
3
2
32
21
22
32
1-2-1
24-1
111
f f*h
h
1-1-1
12-1
111
Bahadir K. Gunturk 13
Convolution Example
From C. Rasmussen, U. of Delaware
Step 2
3
2
1
2
2
1
3
2
32
21
22
32 45
3
2
1
2
2
1
3
2
32
21
22
32
3-1-2
24-2
111
f f*h
h
1-1-1
12-1
111
Bahadir K. Gunturk 14
Convolution Example
From C. Rasmussen, U. of Delaware
Step 3
3
2
1
2
2
1
3
2
32
21
22
32 4 45
3
2
1
2
2
1
3
2
32
21
22
32
3-3-1
34-2
111
f f*h
h
1-1-1
12-1
111
Bahadir K. Gunturk 15
From C. Rasmussen, U. of Delaware
Convolution ExampleStep 4
3
2
1
2
2
1
3
2
32
21
22
32 4 4 -25
3
2
1
2
2
1
3
2
32
21
22
32
1-3-3
16-2
111
f f*h
h
1-1-1
12-1
111
Bahadir K. Gunturk 16
From C. Rasmussen, U. of Delaware
Convolution ExampleStep 5
3
2
1
2
2
1
3
2
32
21
22
32 4 4
9
-25
3
2
1
2
2
1
3
2
32
21
22
32
2-2-1
14-1
221
f f*h
h
1-1-1
12-1
111
Bahadir K. Gunturk 17
From C. Rasmussen, U. of Delaware
Convolution ExampleStep 6
3
2
1
2
2
1
3
2
32
21
22
32
6
4 4
9
-25
3
2
1
2
2
1
3
2
32
21
22
32
1-2-2
32-2
222
f f*h
h
1-1-1
12-1
111
Bahadir K. Gunturk 18
From C. Rasmussen, U. of Delaware
Convolution Example
and so on…
Bahadir K. Gunturk 19
Example
1 1 11 1 1 19
1 1 1
* =
Bahadir K. Gunturk 20
Example
* =1 1 11 8 11 1 1
Bahadir K. Gunturk 21
Try MATLAB
f=imread(‘saturn.tif’);figure; imshow(f);[height,width]=size(f);f2=f(1:height/2,1:width/2);figure; imshow(f2);[height2,width2=size(f2);f3=double(f2)+30*rand(height2,width2);figure;imshow(uint8(f3)); h=[1 1 1 1; 1 1 1 1; 1 1 1 1; 1 1 1 1]/16; g=conv2(f3,h);figure;imshow(uint8(g));
Bahadir K. Gunturk 22
Gaussian Lowpass Filter
Bahadir K. Gunturk 23
Gaussian Lowpass Filter
= 2 = 4 From Forsyth & PonceOriginal