% image_deblur.m % Uses DECONVLUCY to deblur an image. Useful for blowing up % pictures of limited resolution to larger sizes. It first % interpolates the pixels and then uses the deconvolution to % remove blur and noise. There are many methods of deblur in % FSPECIAL. Adjust the parameters in this command to optimize % the image adjustment. % file = 'C:\Documents and Settings\Colin Joye\Desktop\AES.bmp'; I = imread(file); I = imresize(I,3,'bicubic'); % Create the PSF, type HELP FSPECIAL for details. PSF1 = fspecial('gaussian',50,1.2); % deblurr or de-pixelate image luc1 = deconvlucy(I,PSF1,2); % save with new filename imwrite(luc1,[file(1:end-4) '_.bmp']); %imwrite(luc1,[file(1:end-4) '_.png'],'Transparency',[1 1 1]); figure(2); clf(2) subplot(121) imshow(I); title('Original Image'); subplot(122) imshow(luc1,'truesize'); title('Restored Image #1'); % -------- End