» inp = imread('cameraman.tif');
» fuzzy(inp);
function fuzzy(g) % FUZZY % fuzzy(g) multiplies transform by varying amounts of % uniform random phaseand then inverse transforms to % obtain distorted versions of original image.. g = im2double(g); gf = fft2(sqrt(g)); siz = size(g); for idx = 1:11 phase = exp(i*2.0*pi*(rand(siz)-0.5)*(idx-1)*0.5); ginv = ifft2(gf.*phase); ginv = ginv.*conj(ginv); str = sprintf('fuzz_%d.jpg',5*(idx-1)); imwrite(ginv/max(ginv(:)),str); end
Maintained by John Loomis, last updated 8 March 2000