function im = imnoisefilter(im)

%% remove noise from image
sz = size(im);
for x = 1:sz(1)
    for y = 1:sz(2)
        if im(x,y) > 0.9, im(x,y) = 1; end
    end
end