function outputdata = filterII(inputdata) 
[a,b] = size(inputdata);
inputdata=double(inputdata);


for x = 2:a-1,
for y = 1:b,
outputdata(x,y)=median([inputdata(x-1,y),inputdata(x,y),inputdata(x+1,y)]);
end
end

outputdata=uint8(outputdata)
