%arithmatic mean filter
im=imread('chest.tif');%loading image
figure,imshow(im);title('original');[row col]=size(im);%storing size of image
for i=1:1:row-2;%sweeping through rows
for j=1:1:col-2;%sweeping through columns
for u=1:1:2;%sweeping through window
for v=1:1:2; %taking arithmetic mean
im(i,j)=im(i,j)+im(i+u,j+v); im(i,j)=im(i,j)/9; end end endend%showing final image
figure,imshow(im);title('arthmean');
MATLAB: How to apply the arithmetic mean filter to a medical image to improve it? I have wrote this code but it did not work, there is an error which I could not figure it out.
digital image processingfilterimage processing
Best Answer