Chapter 2: Digital Image Fundamentals

Download Report

Transcript Chapter 2: Digital Image Fundamentals

Chapter 1
Fundamental Concepts
1
Signals
• A signal is a pattern of variation of a
physical quantity, often as a function of time
(but also space, distance, position, etc).
• These quantities are usually the independent
variables of the function defining the signal.
• A signal encodes information, which is the
variation itself.
2
Voltage
Normal ECG Signal
Time
3
North
Radar Signal
East
4
Voltage
“Hello”
Time
5
Signal Processing
• Signal processing is the discipline concerned
with extracting, analyzing, and manipulating
the information carried by signals
• The processing method depends on the type
of signal and on the nature of the information
carried by the signal
6
Characterization and Classification
of Signals
• The type of signal depends on the nature of
the independent variables and on the value
of the function defining the signal
• For example, the independent variables can
be continuous or discrete
• Likewise, the signal can be a continuous or
discrete function of the independent
variables
7
Characterization and Classification
of Signals – Cont’d
• Moreover, the signal can be either a realvalued function or a complex-valued function
• A signal consisting of a single component is
called a scalar or one-dimensional (1-D)
signal
8
Examples: CT vs. DT Signals
x(t )
x[n]
t
plot(t,x)
n
stem(n,x)
9
Sampling
• Discrete-time signals are often obtained by
sampling continuous-time signals
x(t )
. .
x[n]  x(t )
t nT
 x(nT )
10
Code for MATLAB demo
>> syms t
>> syms x
>> x=exp(-.3*t)*sin(2*t/3);
>> ezplot(x)
>> ezplot(x, 0, 30)
>> grid on
>> x=exp(-.1*t)*sin(2*t/3);
>> ezplot(x, 0, 30)
>> grid on
>> n=1:2:100;
>> y=n.^1.5;
>> stem(n,y)
>> n=-10:10;
>> y=n.^2;
>> stem(n,y)
11
Systems
• A system is any device that can process
signals for analysis, synthesis, enhancement,
format conversion, recording, transmission,
etc.
• A system is usually mathematically defined
by the equation(s) relating input to output
signals (I/O characterization)
• A system may have single or multiple inputs
and single or multiple outputs
12
Block Diagram Representation
of Single-Input Single-Output
(SISO) CT Systems
input signal
x(t )
output signal
T
y (t )  T  x(t )
13
Types of input/output
representations considered
• Differential equation
• Convolution model
• Transfer function representation (Fourier
transform, Laplace transform)
14
Examples of 1-D, Real-Valued, CT Signals:
Temporal Evolution of Currents and
Voltages in Electrical Circuits
y (t )
t
15
Examples of 1-D, Real-Valued, CT Signals:
Temporal Evolution of Some Physical
Quantities in Mechanical Systems
y (t )
t
16
Continuous-Time (CT) Signals
1,
• Unit-step function u (t )  
0,
 t,
• Unit-ramp function r (t )  
0,
t0
t0
t0
t0
17
Unit-Ramp and Unit-Step Functions:
Some Properties
 x(t ), t  0
x(t )u (t )  
t0
0,
t
r (t )   u ( )d 

dr (t )
u (t ) 
dt
(with exception of
t 0)
18
The Rectangular Pulse Function
p (t )  u (t   / 2)  u (t   / 2)
19
The Unit Impulse
• A.k.a. the delta function or Dirac distribution
• It is defined by:
 (t )  0, t  0

  ( )d   1,
  0

• The value  (0) is not defined, in particular
 (0)  
20
The Unit Impulse:
Graphical Interpretation
 (t )  lim p A(t )
A 
A is a very large number
21
The Scaled Impulse K(t)
• K (t ) is the impulse with area K ,
i.e.,
K  (t )  0, t  0

 K  ( ) d   K ,
  0

22
Properties of the Delta Function
t
u (t ) 
1)
  ( ) d 

t except t  0
t 0 
2)
 x(t ) (t  t )dt  x(t )
0
t0 
0
  0
(sifting property)
23
Periodic Signals
• Definition: a signal x(t ) is said to be periodic
with period T , if
x(t  T )  x(t ) t 
• Notice that x(t ) is also periodic with period
qT where q is any positive integer
• T is called the fundamental period
24
Example: The Sinusoid
x(t )  A cos(t   ), t 
 [ rad / sec]
 [ rad ]

f 
2
[1/ sec]  [ Hz ]
25
Time-Shifted Signals
26
Points of Discontinuity
• A continuous-time signal x(t ) is said to be


discontinuous at a point t0 if x(t0 )  x(t0 )
where t0  t0   and t0  t0   ,  being a
small positive number
x(t )
t0
t
27
Continuous Signals
• A signal x(t ) is continuous at the point t0 if
x(t )  x(t )

0

0
• If a signal x(t ) is continuous at all points t,
x(t ) is said to be a continuous signal
28
Example of Continuous Signal:
The Triangular Pulse Function
29
Piecewise-Continuous Signals
• A signal x(t ) is said to be piecewise
continuous if it is continuous at all t
except a finite or countably infinite
collection of points ti , i  1, 2,3,
30
Example of Piecewise-Continuous
Signal: The Rectangular Pulse Function
p (t )  u (t   / 2)  u (t   / 2)
31
Another Example of PiecewiseContinuous Signal:
The Pulse Train Function
32
Derivative of a Continuous-Time Signal
• A signal x(t ) is said to be differentiable at a
point t0 if the quantity
x(t0  h)  x(t0 )
h
has limit as h  0 independent of whether h
approaches 0 from above (h  0) or from
below (h  0)
• If the limit exists, x(t ) has a derivative at t0
dx(t )
x(t0  h)  x(t0 )
 lim
t

t
33
h 0
0
dt
h
Generalized Derivative
• However, piecewise-continuous signals
may have a derivative in a generalized sense
• Suppose that x(t ) is differentiable at all t
except t  t0
• The generalized derivative of x(t ) is
defined to be
dx(t )


  x(t0 )  x(t0 )   (t  t0 )
dt
ordinary derivative of x(t ) at all t except t  t0
34
Example: Generalized Derivative
of the Step Function
K
• Define x(t )  Ku (t )
K
• The ordinary derivative of x(t ) is 0 at all
points except t  0
• Therefore, the generalized derivative of x(t ) is
K u (0 )  u (0 )   (t  0)  K  (t )


35
Another Example
of Generalized Derivative
• Consider the function defined as
 2t  1, 0  t  1
1,
1 t  2

x(t )  
 t  3, 2  t  3
0,
all other t
36
Another Example
of Generalized Derivative: Cont’d
37
Example of CT System:
An RC Circuit
Kirchhoff’s current law:
iC (t )  iR (t )  i (t )
38
RC Circuit: Cont’d
• The v-i law for the capacitor is
dvC (t )
dy (t )
iC (t )  C
C
dt
dt
• Whereas for the resistor it is
1
1
iR (t )  vC (t )  y (t )
R
R
39
RC Circuit: Cont’d
• Constant-coefficient linear differential
equation describing the I/O relationship if
the circuit
dy (t ) 1
C
 y (t )  i (t )  x(t )
dt
R
40
RC Circuit: Cont’d
• Step response when R=C=1
41
Basic System Properties: Causality
• A system is said to be causal if, for any time
t1, the output response at time t1 resulting
from input x(t) does not depend on values of
the input for t > t1.
• A system is said to be noncausal if it is not
causal
42
Example: The Ideal Predictor
y (t )  x(t  1)
43
Example: The Ideal Delay
y (t )  x(t  1)
44
Memoryless Systems
and Systems with Memory
• A causal system is memoryless or static if,
for any time t1, the value of the output at
time t1 depends only on the value of the input
at time t1
• A causal system that is not memoryless is
said to have memory. A system has memory
if the output at time t1 depends in general on
the past values of the input x(t) for some
range of values of t up to t = t1
45
Examples
• Ideal Amplifier/Attenuator
y (t )  K x(t )
• RC Circuit
t
1  (1/ RC )( t  )
y (t )   e
x( )d , t  0
C0
46
Basic System Properties:
Additive Systems
• A system is said to be additive if, for any
two inputs x1(t) and x2(t), the response to the
sum of inputs x1(t) + x 2(t) is equal to the
sum of the responses to the inputs
(assuming no initial energy before the
application of the inputs)
x1 (t )  x2 (t )
system
y1 (t )  y2 (t )
47
Basic System Properties:
Homogeneous Systems
• A system is said to be homogeneous if, for
any input x(t) and any scalar a, the response
to the input ax(t) is equal to a times the
response to x(t), assuming no energy before
the application of the input
ax(t )
system
ay (t )
48
Basic System Properties: Linearity
• A system is said to be linear if it is both
additive and homogeneous
ax1 (t )  bx2 (t )
system
ay1 (t )  by2 (t )
• A system that is not linear is said to be
nonlinear
49
Example of Nonlinear System:
Circuit with a Diode
 R2
x(t ), when x(t )  0

y (t )   R1  R2
0,
when x(t )  0

50
Example of Nonlinear System:
Square-Law Device
y (t )  x (t )
2
51
Example of Linear System:
The Ideal Amplifier
y (t )  K x(t )
52
Example of Nonlinear System:
A Real Amplifier
53
Basic System Properties:
Time Invariance
• A system is said to be time invariant if, for any
input x(t) and any time t1, the response to the
shifted input x(t – t1) is equal to y(t – t1) where
y(t) is the response to x(t) with zero initial
energy
x(t  t1 )
system
y (t  t1 )
• A system that is not time invariant is said to be
time varying or time variant
54
Examples of Time Varying Systems
• Amplifier with Time-Varying Gain
y (t )  tx(t )
• First-Order System
y (t )  a(t ) y (t )  bx(t )
55
Basic System Properties:
CT Linear Finite-Dimensional
Systems
• If the N-th derivative of a CT system can be
written in the form
N 1
M
i 0
i 0
y ( N ) (t )   ai (t ) y ( i ) (t )   bi (t ) x ( i ) (t )
then the system is both linear and finite
dimensional
• To be time-invariant
ai (t )  ai
and
bi (t )  bi
 i and t 
56