410filterdemo - %% Filtering for signal load handel...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%% Filtering for image load woman X = X / 256; % normalize image pixel values to between 0 and 1 subplot(1, 3, 1); imshow(X); N = random('normal', 0, 0.1, 256, 256); % random noise XN = X + N; subplot(1, 3, 2); imshow(XN); h = 1/8 * [1, 1, 1, 1, 1, 1, 1, 1]; % moving average filter Y = conv2(X, h); subplot(1, 3, 3); imshow(Y);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %% Filtering for signal load handel sound(y, Fs) h1 = fir1(30, 0.5, 'low') % lowpass filter with cut-off frequency pi/2 figure, freqz(h1); y1 = conv(y, h1); sound(y1, Fs); h2 = fir1(30, 0.5, 'high') % highpass filter with cut-off frequency pi/2 figure, freqz(h2); y2 = conv(y, h2); sound(y2, Fs);...
View Full Document

This note was uploaded on 01/22/2011 for the course ECE 410 taught by Professor Staff during the Spring '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online