37
LINEAR SYSTEM CONVOLUTION LINEAR FILTER CS 111: Digital Image Processing Aditi Majumder

LINEAR SYSTEM CONVOLUTION LINEAR FILTERgraphics.ics.uci.edu/CS111/Slides/LinearConvolution.pdf• Convolution: Response of a linear system with impulse response, h, to a general signal

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • LINEAR SYSTEMCONVOLUTIONLINEAR FILTER

    CS 111: Digital Image ProcessingAditi Majumder

  • Outline

    • Linear System• Properties• Response

    • Convolution• Concept• Properties

    • Linear Filter• Low pass, High pass, Aliasing…

  • Properties of Linear System

    3

    1. Homogeneity:

    2. Additivity:

    3. Shift Invariance:

  • Other Properties of Linear Systems1. Commutative:

    2. Superposition: If each generates multiple outputs, Then the addition of inputs generates an addition of outputs.

    4

  • Decomposition - Synthesis

    5

  • Response of Linear System• Impulse: Signal with only one non-zero sample. • Delta (δ[t]) is an impulse with non-zero sample at t = 0

    6

  • Response of Linear System• Impulse response h[t]

    • output of the system to the input δ[t].

    7

  • Response of Linear System• Impulse response h[t]

    • output of the system to the input δ[t].• Convolution: Response of a linear system with impulse

    response, h, to a general signal

    8

  • Convolution – Input side

    9

    a1 a2 a3 a4 a5 a6 a7

    i=1

    Input

    Kernel

    Output

    k1 k2 k3

    i=2

    k1 k2 k3

    i=3

  • Convolution – Output side

    10

    a1 a2 a3 a4 a5 a6 a7Input

    Kernel

    Output

    k3 k2 k1

    i=1 i=2

    k3 k2 k1

    i=3

  • Convolution

    11

    s[m]

    h[m]

    s[0].h[n]

    s[1].h[n-1]

    s[2].h[n-2]

  • 2D Convolution

    12

  • Properties of Convolution

    • All pass system

    • Amplifier (k>0) / attenuator (k

  • Properties of Convolution• Commutative

    • Associative

    • Distributive

    14

  • Properties of Convolution• Cascading convolutions

    • Combination of parallel convolutions

    15

  • Blurring filters

    16

    • More blurring implies widening the base and shortening the height of the spike further.

    • What does it look like?• Box filters are not best blurring filters but the easiest to

    implement.

  • Duality

    17

    Spatial Domain Frequency Domain

  • Duality

    18

    Spatial Domain Frequency Domain

    Widening in one domain is narrowing in another and vice-versa.

  • Duality• Convolution of two functions in time/spatial domain is a

    multiplication in frequency domain• Vice Versa

    19

  • All Pass Filter

    20

  • Low Pass Filter

    21

    t

    k[t]

    F

    f

    K[f]

    A(f)X

    t

    a(t)

  • Low Pass Filtering• Box filter is known as low pass filter.

    22

  • Box Filter

    23

    • Effect of increasing the size of the box filter

  • Gaussian Pyramid

    24

  • Gaussian Pyramid

    25

  • Box is not the only shape• Gaussian is a better shape• Any thing more smooth is better

    26

    t

    x[t]

    F

    f

    X[f]

  • Hierarchical Filtering

    27

    1/4 1/4

    1/4 1/4

    N x NN/2 x N/2

    N/4 x N/4

    1 x 1

  • Issue of Sampling• As an image undergoes low pass filtering, its frequency

    content decreases • Minimum number of samples required to adequately sample

    the low pass filtered image is less.• Low pass filtered image can be at a smaller size than the

    original image.

    28

  • Subsampling

    29

    Simple subsampling

    Pre-filtering and subsampling

  • Aliasing Artifact

    30

    Input (256 x 256)

    Subsampled(128 x 128) Subsampled from filtered image(128 x 128)

    Insufficient sampling.Hence, aliasing.

    Filtering reduces frequency content.Hence, lower sampling is sufficient.

    Filtered (256 x 256)ANTI-ALIASING

  • High Pass Filter•

    31

  • High Pass Filter

    32

    Original Image Low pass filtered High pass filtered

  • Band-limited Images (Laplacian Pyramid)

    33

    Gn

    Gn-1

    Gn-2

    fnfn-1fn-2

    fn-2

  • Band-limited Images (Laplacian Pyramid)

    34

  • 2D Filter Separability• Visualizing 2D filters from their 1D counter part

    35

    Box Filter Gaussian Filter High Pass Filter

  • 2D Filter Separability•

    36

  • 2D Filter Separability• Advantage

    • Separable filters can be implemented more efficiently

    • Convolving with h• Number of multiplications = 2pqN

    • Convolving with a and b• Number of multiplications = 2(p+q)N

    37

    Linear system�Convolution�Linear FilterOutlineProperties of Linear SystemOther Properties of Linear SystemsDecomposition - SynthesisResponse of Linear SystemResponse of Linear SystemResponse of Linear SystemConvolution – Input sideConvolution – Output sideConvolution2D ConvolutionProperties of ConvolutionProperties of ConvolutionProperties of ConvolutionBlurring filtersDualityDualityDualityAll Pass FilterLow Pass FilterLow Pass FilteringBox FilterGaussian Pyramid �Gaussian Pyramid �Box is not the only shapeHierarchical FilteringIssue of SamplingSubsamplingAliasing Artifact High Pass FilterHigh Pass FilterBand-limited Images (Laplacian Pyramid)Band-limited Images (Laplacian Pyramid)2D Filter Separability2D Filter Separability2D Filter Separability