% This is what I typed in class.
% it DOES contain mistakes

I = imread('DesertSmall.jpg');
I = double(I)/255;
I = (I(:,:,1)+I(:,:,2)+I(:,:,3))/3;
imshow(I)
h = [1 1 1 1 1]/5;
I2 = imfilter(I,h)
imshow(I2)
shg
I3 = imfilter(I,h')
imshow(I3)
shg
h = ones(5,5)/25;
I3 = imfilter(I,h);
imshow(I3)
shg
figure
h = ones(1,5)/5
h'
I2 = imfilter(I,h);
Iblurred = imfilter(I2,h');
imshow(Iblurred)
shg
I3 = Iblurred
Isquare = imfilter(I,ones(5,5)/25);
Isquare == Iblurred
h
imshow(Iblurred)
shg
help imfilter
I = ones(size(I));
imshow(I)
shg
I(:,1:2:end,:) = 0;
imshow(I)
shg
h = [1 1 1]/3
I2 = imfilter(I,h);
imshow(I2)
shg
h = [1 1 1 1 1]/3;
h = [1 1 1 1 1]/5;
I2 = imfilter(I,h);
imshow(I2)
shg
h = ones(1,11)/11;
I2 = imfilter(I,h);
imshow(I2)
shg
x = [-10:.1:10];
y = normpdf(x);
plot(x,y)
shg
commandhistory