I am trying to understand the working of median filter. this is the code %start
A = imread('/*path name*/') ;A = im2double(A);[m n] = size(A);Med = [];%Modified filter
for i=2:m-1 for j=2:n-1 Med(1) = A(i-1,j-1); Med(2) =A(i-1,j) ; Med(3) = A(i-1,j+1); Med(4) = A(i,j-1); Med(5) = A(i,j+1); Med(6) = A(i+1, j-1); Med(7) = A(i+1,j); Med(8) = A(i+1,j+1); A(i,j) = median(Med); endend imshow(A);
but the output is not as expected. it is blurry. need help..
Best Answer