You are on page 1of 2

img = imread("hawk.

png");
img = rgb2gray(img);
imgdou = im2double(img);

f = ones(3,3)/10;

imgf = filter2(f, imgdou, 'same');


si = size(imgdou);
imgfil = zeros(379,445);
%for i = 0:379
% for j = 0:445
% imgfil(i,j) = imgfil(i,j) + f(mod(i, 3), mod(j,3))*imgdou(i, j);
% end
%end

figure;
imshow(img);
title 'original image';

figure;
imshow(imgf);
title 'filtered image';

1
2

You might also like