Current location - Education and Training Encyclopedia - Graduation thesis - MATLAB implementation of butterworth filter
MATLAB implementation of butterworth filter
brief introduction

Butterworth filter is a kind of electronic filters. The characteristic of Butterworth filter is that the frequency response curve of passband is the smoothest. This filter was first proposed by British engineer Stephen Butterworth in a paper published in the British Journal of Radio Engineering in 1930. The characteristics of Butterworth filter The characteristic of Butterworth filter is that the frequency response curve in the passband is as flat as possible without fluctuation, and gradually drops to zero in the stopband. On the wave diagram of logarithmic amplitude diagonal frequency, starting from a certain boundary angular frequency, the amplitude gradually decreases with the increase of angular frequency and tends to negative infinity. Butterworth low-pass filter is used to smooth the image disturbed by noise.

Instance of lyqmath%

% DLUT School of Mathematical Sciences, 2008

% BLOG: /lyqmath

Clc is completely removed; All closed;

I = im read(' rice . png ');

Figure;

Subplots (2, 2,1); Imshow (1); Title ("original");

J 1 = imnoise(I,' salt & pepper'); % superimposed salt and pepper noise

Subplots (2, 2, 2); imshow(j 1); Title ("noisy image");

g = FFT 2(double(j 1)); % Fourier transform

g = FFT shift(g); % transformation data matrix

[M, N]= size (g);

nn = 2; % Second-order Butterworth low-pass filter

d0 = 20

M = fix(M/2);

N = fix(N/2);

Because i = 1:M

For j = 1:N

d = sqrt((i-m)^2+(j-n)^2);

h = 1/( 1+0.4 14*(d/d0)^(2*nn)); % Calculate the low-pass filter transfer function

Results (i, j) = h*g(i, j);

T(i,j)= h;

end

end

Result = ifftshift (result);

J2 = ifft2 (result);

JBOY3 = uint8 (real (J2)););

Subplots (2, 2, 3); Mesh (t); Title ("Filter Schematic")

Open the box;

% displays the filtered image.

Subplots (2, 2, 4); IM SHOW (J3); Title ("Filter Results") Results