Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
median filter”
1. Introduction: NOISE
In audio , noise is generally any unpleasant sound and, more
technically, any unwanted sound that is unintentionally added
to a desired sound. In recording sound, noise is often present on
analog tape or low-fidelity digital recordings. The
standard audio cassette includes a layer of hiss on every
recording.
IMPULSE NOISE:
Impulse noise is a category of (acoustic) noise which includes
unwanted, almost instantaneous (thus impulse-like) sharp sounds (like
clicks and pops). Noises of the kind are usually caused
by electromagnetic interference, scratches on the recording
disks, gunfire, explosions and ill synchronization in digital recording
and communication. High levels of such a noise (200+ decibels) may
damage internal organs, while 180 decibels are enough to destroy or
damage human ears.
1|Page
It occurs due to clicks, scratches, burst and crackles or due to an error
in the transmission device . There are two types of impulse noise; the
first one is fixed value impulse noise which takes only two values 0 or
1. The other type is random value impulse noise which may take any
value in the range between two values; one of them is maximum and
the other is minimum. Thus, random valued impulse noise is more
difficult to detect compared to the fixed valued type because random
valued impulse noise takes a range of values similar to that of the audio
signal.
MEDIAN FILTER:
2|Page
However, a median filter will eliminate changes in the input signal with
a duration less than half the size of the filter window. When the signal
is heavily corrupted with impulse noise, a large median window is
needed and this leads to more uncorrupted samples being replaced by
the median value within the window and more high frequency
components being removed by the filter. As a result, conventional
techniques for impulse noise removal perform poorly for an acceptable
level of feature and tonal quality. The ideal objective would be to
replace only the noisy samples, leaving uncorrupted samples
unchanged.
2. Approach of Algorithm(steps):
3. Algorithm implementation(program):
[y1,fs]=audioread('C:\Users\001su\Downloads\10khzwav.wav');
time=1/fs*length(y1);
t=linspace(0,time,length(y1));
figure
subplot(2,1,1)
plot(t,y1);
sound(y1,fs)
title('time plot of original audio');
subplot(2,1,2)
3|Page
N=length(y1);
Fc=((-N/2):(N/2)-1)/N;
F=fs*Fc;
plot(F,y1);
title('frequency plot of original audio');
%noise
figure
subplot(1,1,1)
Y= medfilt1(y1,10);
filename= ('C:\Users\001su\Downloads\result.wav');
audiowrite(filename,Y,fs);
plot(t,y1,t,Y)
sound(Y,fs)
title('comparing both signals');
legend('original','filtered')
legend('boxoff')
%basic median filter
Fs=100;
T=0:1/fs:1;
x=sin(2*pi*t*3)+0.25*sin(2*pi*t*40);
figure
subplot(1,1,1)
Y= medfilt1(x,10);
plot(t,x,t,Y)
title('basic working of median filter on sinosoidal signal');
legend('original','filtered')
legend('boxoff')
4. Results :
4|Page
5|Page
5. Conclusion :
Median filters find their application in various fields like
1.ECG Signals
2.Video signals
3.Digital images
4.Radiographic images
6|Page