Review:%20Linear%20Systems - PowerPoint PPT Presentation

About This Presentation
Title:

Review:%20Linear%20Systems

Description:

Review: Linear Systems – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 66
Provided by: ece5
Learn more at: https://www.ece.lsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Review:%20Linear%20Systems


1
Review Linear Systems
  • We define a system as a unit that converts an
    input function into an output function.

Independent variable
System operator
2
Linear Systems
  • Let

where fi(x) is an arbitrary input in the class
of all inputs f(x), and gi(x) is the
corresponding output.
  • If

Then the system H is called a linear system.
  • A linear system has the properties of additivity
    and homogeneity.

3
Linear Systems
  • The system H is called shift invariant if

for all fi(x) ?f(x) and for all x0.
  • 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.

4
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.
5
Linear Systems
  • A unit impulse function, denoted ?(a), is defined
    by the expression

?(x-a)
?(a)
a
x
6
Linear Systems
  • A unit impulse function, denoted ?(a), is defined
    by the expression

Then
7
Linear Systems
  • The term

is called the impulse response of H.
  • From the previous slide
  • It states that, if the response of H to a unit
    impulse i.e., h(x, ?), is known, then response
    to any input f can be computed using the
    preceding integral. In other words, the response
    of a linear system is characterized completely by
    its impulse response.


8
Linear Systems
  • If H is a shift-invariant system, then

and the integral becomes
  • 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.

9
Linear Systems
  • Convolution of two functions is defined as
  • In the discrete case

10
Linear Systems
  • In the 2D discrete case

is a linear filter.
11
Convolution Example
h
1 -1 -1
1 2 -1
1 1 1
f
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
Rotate
From C. Rasmussen, U. of Delaware
12
Convolution Example
2
2
3
2
1
1
1
Step 1
1
3
3
2
1
2
-1
2
1
2
2
1
-1
-1
3
2
2
1
h
1
1
1
2
4
-1
1
-2
-1
fh
f
From C. Rasmussen, U. of Delaware
13
Convolution Example
2
2
3
2
1
1
1
Step 2
1
3
3
2
1
2
-1
2
1
2
2
1
-1
-1
3
2
2
1
h
1
1
1
4
5
2
4
-2
3
-1
-2
fh
f
From C. Rasmussen, U. of Delaware
14
Convolution Example
2
2
3
2
1
1
1
Step 3
1
3
3
2
1
2
-1
2
1
2
2
1
-1
-1
3
2
2
1
h
1
1
1
3
4
-2
3
-3
-1
fh
f
From C. Rasmussen, U. of Delaware
15
Convolution Example
2
2
3
2
1
1
1
Step 4
1
3
3
2
1
2
-1
2
1
2
2
1
-1
-1
3
2
2
1
h
1
1
1
1
6
-2
1
-3
-3
fh
f
From C. Rasmussen, U. of Delaware
16
Convolution Example
2
2
3
2
1
1
1
Step 5
1
3
3
2
1
2
-1
2
1
2
2
1
-1
-1
3
2
2
1
h
2
2
1
1
4
-1
2
-2
-1
fh
f
From C. Rasmussen, U. of Delaware
17
Convolution Example
2
2
3
2
1
1
1
Step 6
1
3
3
2
1
2
-1
2
1
2
2
1
-1
-1
3
2
2
1
h
2
2
2
3
2
-2
1
-2
-2
fh
f
From C. Rasmussen, U. of Delaware
18
Convolution Example
and so on
From C. Rasmussen, U. of Delaware
19
Example


20
Example


21
MATLAB
  • Review your matrix-vector knowledge
  • Matlab help files are helpful to learn it
  • Exercise
  • f 1 2 3 4
  • g 1 1
  • g 1 1
  • g
  • z f g
  • n010
  • plot(sin(n))
  • plot(n,sin(n)) title(Sinusoid) xlabel(n)
    ylabel(Sin(n))
  • n00.110
  • plot(n,sin(n))
  • grid
  • figure subplot(2,1,1) plot(n,sin(n))
    subplot(2,1,2) plot(n,cos(n))

22
MATLAB
  • Some more built-ins
  • a zeros(3,2)
  • b ones(2,4)
  • c rand(3,3) Uniform distribution
  • help rand
  • help randn Normal distribution
  • d1 inv(c)
  • d2 inv(rand(3,3))
  • d3 d1d2
  • d4 d1-d2
  • d5 d1d2
  • d6 d1.d3
  • e d6()

23
MATLAB
  • Image processing in Matlab
  • ximread(cameraman.tif)
  • figure
  • imshow(x)
  • h,wsize(x)
  • yx(0h/2,0w/2)
  • imwrite(y,man.tif)
  • To look for a keyword
  • lookfor resize

24
MATLAB
  • M-file
  • Save the following as myresize1.m
  • function ymyresize1(x)
  • This function downsamples an image by two
  • h,wsize(x)
  • for i1h/2,
  • for j1w/2,
  • y(i,j) x(2i,2j)
  • end
  • end
  • Compare with myresize2.m
  • function ymyresize2(x)
  • This function downsamples an image by two
  • h,wsize(x)
  • for i0h/2-1,
  • for j0w/2-1,
  • y(i1,j1) x(2i1,2j1)
  • end
  • end
  • Compare with myresize3.m
  • function ymyresize3(x)
  • This function downsamples an image by two
  • y x(12end,12end)
  • We can add inputs/outputs
  • function y,height,widthmyresize4(x,factor)
  • Inputs
  • x is the input image
  • factor is the downsampling factor
  • Outputs
  • y is the output image
  • height and width are the size of the output
    image
  • y x(1factorend,1factorend)
  • height,width size(y)

25
Try MATLAB
  • fimread(saturn.tif)
  • figure imshow(f)
  • height,widthsize(f)
  • f2f(1height/2,1width/2)
  • figure imshow(f2)
  • height2,width2size(f2)
  • f3double(f2)30rand(height2,width2)
  • figureimshow(uint8(f3))
  • h1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1/16
  • gconv2(f3,h)
  • figureimshow(uint8(g))

26
EE 7730
  • Edge Detection

27
Detection of Discontinuities
  • Matched Filter Example
  • gtgt a0 0 0 0 1 2 3 0 0 0 0 2 2 2 0 0 0 0 1 2 -2
    -1 0 0 0 0
  • gtgt figure plot(a)
  • gtgt h1 -1 -2 2 1/10
  • gtgt b1 conv(a,h1) figure plot(b1)

28
Detection of Discontinuities
  • Point Detection Example
  • Apply a high-pass filter.
  • A point is detected if the response is larger
    than a positive threshold.
  • The idea is that the gray level of an isolated
    point will be quite different from the gray level
    of its neighbors.

Threshold
29
Detection of Discontinuities
  • Point Detection

Detected point
30
Detection of Discontinuities
  • Line Detection Example

31
Detection of Discontinuities
  • Line Detection Example

32
Detection of Discontinuities
  • Edge Detection
  • An edge is the boundary between two regions with
    relatively distinct gray levels.
  • Edge detection is by far the most common approach
    for detecting meaningful discontinuities in gray
    level. The reason is that isolated points and
    thin lines are not frequent occurrences in most
    practical applications.
  • The idea underlying most edge detection
    techniques is the computation of a local
    derivative operator.

33
Origin of Edges
surface normal discontinuity
depth discontinuity
surface color discontinuity
illumination discontinuity
  • Edges are caused by a variety of factors

34
Profiles of image intensity edges
35
Image gradient
  • The gradient of an image
  • The gradient points in the direction of most
    rapid change in intensity
  • The gradient direction is given by
  • The edge strength is given by the gradient
    magnitude

36
Edge Detection
  • The gradient vector of an image f(x,y) at
    location (x,y) is the vector
  • The magnitude and direction of the gradient
    vector are
  • is also used in edge detection
    in addition to the magnitude of the gradient
    vector.

37
The discrete gradient
  • How can we differentiate a digital image fx,y?
  • Option 1 reconstruct a continuous image, then
    take gradient
  • Option 2 take discrete derivative (finite
    difference)

38
Effects of noise
  • Consider a single row or column of the image
  • Plotting intensity as a function of position
    gives a signal

39
Solution smooth first
40
Derivative theorem of convolution
  • This saves us one operation

41
Laplacian of Gaussian
  • Consider

Laplacian of Gaussian operator
Zero-crossings of bottom graph
42
2D edge detection filters
Laplacian of Gaussian
Gaussian
derivative of Gaussian
  • is the Laplacian operator

43
The Canny edge detector
  • original image (Lena)

44
The Canny edge detector
  • norm of the gradient

45
The Canny edge detector
  • thresholding

46
The Canny edge detector
  • thinning
  • (non-maximum suppression)

47
Non-maximum suppression
  • Check if pixel is local maximum along gradient
    direction
  • requires checking interpolated pixels p and r

48
Predicting the next edge point
Assume the marked point is an edge point. Then
we construct the tangent to the edge curve (which
is normal to the gradient at that point) and use
this to predict the next points (here either r or
s).
49
Non-maximum suppression
50
Hysteresis
  • The threshold used to find starting point may be
    large in following the edge.
  • This leads to broken edge curves.
  • The trick is to use two thresholds A large one
    when starting an edge chain, a small one while
    following it.

51
Edge detection by subtraction
original
52
Edge detection by subtraction
smoothed (5x5 Gaussian)
53
Edge detection by subtraction
Why does this work?
smoothed original (scaled by 4, offset 128)
filter demo
54
Gaussian - image filter
Gaussian
delta function
Laplacian of Gaussian
55
Edge Detection
56
Edge Detection
57
Edge Detection
58
Edge Detection
59
Edge Detection
60
Edge Detection
  • The Laplacian of an image f(x,y) is a
    second-order derivative defined as

61
Edge Detection
62
Corners contain more edges than lines.
  • A point on a line is hard to match.

63
Corners contain more edges than lines.
  • A corner is easier

64
Corner Detector
Locate points where intensity is varying in two
directions.
65
Reading
Chris Harris and Mike Stephens. A combined corner
and edge detector. In M. M. Matthews, editor,
Proceedings of the 4th ALVEY vision conference,
pages 147--151, University of Manchester,
England, September 1988.
Write a Comment
User Comments (0)
About PowerShow.com