Aim: To perform blurring & deblurring of an image
Equipments:
Operating System: - Windows XP
Software: - Matlab 7.5, Image Processing Toolbox.
Program:
clc;
close all;
clear all;
f=imread('cameraman.tif');
subplot(1,2,1);imshow(f);title('original image');
LEN = 31;
THETA = 11;
PSF = fspecial('motion',LEN,THETA);
Blurred = imfilter(f,PSF,'circular','conv');
subplot(1,2,2);imshow(Blurred);title('Blurred Image');
% deblurring
figure,subplot(1,2,1);imshow(Blurred);title('Blurred image');
wnr1 = deconvwnr(Blurred,PSF);
subplot(1,2,2);imshow(wnr1);title('Deblurred Image');
title('Restored, True PSF');
1 comments:
needed image enhancement code using pso
Post a Comment