Sei sulla pagina 1di 16

Linear Filtering and Convolution Linear Filtering and Convolution

(contd.) ( )
Linear Filtering and Convolution
Ideal Low-pass Filter
Linear Filtering and Convolution
Butterworth LP Filter
Linear Filtering and Convolution
Butterworth LP
Filter, 2
nd
Order
Linear Filtering and Convolution
Linear Filtering and Convolution
Gaussian
Linear Filtering and Convolution
Gaussian
Variable Cutoffs
Linear Filtering and Convolution
Ideal highpass filter
Butterworth highpass filter
Gaussian highpass filter

>
s
=
0
0
D v) D(u, if 1
D v) D(u, if 0
) , ( v u H
| |
n
v u D
v u H
2
0
) , ( D 1
1
) , (
+
=
2
0
2
2 / ) , (
1 ) , (
D v u D
e v u H

=
Linear Filtering and Convolution
Linear Filtering and Convolution
Ideal
Linear Filtering and Convolution
Butterworth
Linear Filtering and Convolution
Gaussian
Linear Filtering and Convolution
Example of series operations
Linear Filtering and Convolution
Image sharpening is frequently used to improve
the appearance of images by increasing
delineation between different regions of possibly
limited contrast.
The goal is to improve high spatial frequency
definition with minimal disturbance to the contrast
information.
Deconvolution
Deconvolution is exactly what it sounds like: the
undoing of convolution.
This means that instead of mixing two signals in
convolution, we are isolating them.
This is used for analyzing the characteristics of the
input signal and the impulse response when given
only the output of the system.
Given y(t) = x(t) * h(t), the system should isolate
x(t) and h(t) so that we may study each
individually.
Ideal Deconvolution System
Deconvolution
Instead of producing one system that outputs both
the convolved signals, it will be easier to consider
separate systems that output one signal at a time.
Each system here is annihilating the undesired
signal, and is called a homomorphic filter
Homomorphic Filters
Homomorphic filters have been used in signal
processing methods since the 1970s.
A Homomorphic filter is a system which accepts a
signal composed of two components and returns the
signal with one of the components removed.
A frequently used method is to convert the convolution
of two signals into a sum, and then implement a
homomorphic filter to remove signal components.
Linear Filtering and Convolution
Linear Filtering and Convolution
Linear Filtering and Convolution
In frequency space, one can use a filter that
reduces DC by 50%, then increases the filter
function linearly to 4.0 96 pixels from DC and
remains constant thereafter.
In this case, the total power remains unchanged.
MATLAB Syntax
Convolution is an example of a neighborhood function.
Dilation and median filtering are also examples of
neighborhood functions.
MATLAB provides functions for implementing
neighborhood functions across images using a single
command.
MATLAB Syntax
Convolution kernels may be defined manually, or
derived from MATLAB library.
As an example, one may define a 3x3 smoothing filter:
h1=[0 .5 0; .5 1 .5; 0 .5 0];
Another approach is to use the fspecial function:
h1= fspecial(sobel);
MATLAB Syntax
To perform the convolution with your filter and an
input image (A), use the conv2 function:
B = conv2(A,h1);
Where B is the output image, and h1 is the filter
kernel.
MATLAB Syntax
MATLAB also provides for higher dimension
convolution using the convn function which is
useful, for example, when working with multiple
RGB arrays.
For example if you have 5 RGB images, instead of
calling conv2 15 times, a 4D array can be
assembled and convn called once.
MATLAB Syntax
To determine the rank of a matrix, A:
b = rank(A);
If the rank = 1, use singular value decomposition
to find the row and column vectors:
[u,s,v]=svd(A);
kcol = u(:,1) * sqrt(s(1));
krow = conj(v(:,1))' * sqrt(s(1));
If the process was performed correctly, then
kcol - krow
should give you back the original kernel.

Potrebbero piacerti anche