im = imread('d:\comp vision\images\blur.png' );
figure(1)
imshow(im);

%h = psf2(size(im), 1, 0, 10, 10, 2);

%imagesc(fftshift(h)), colormap(gray);

newim = wienfilt(im, 8, 8, 0, 5, 0.02);
% figure(6)


imwritesc(newim, 'textafter.png');