Author Topic: pfilter error. please help.  (Read 141 times)

Offline jerin

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
pfilter error. please help.
« on: February 22, 2010, 01:44:02 PM »

I am doing a project on mathematical analysis of image restoration techniques, using linear restoration filters such as
1.inverse filter
2.pseudo inverse filter
3.weiner filter and
4.constrained least square filter
 
For the pseudo inverse filter, I've programmed as following:
 
clc;
clear all;
close all;
f=imread('C:\Documents and Settings\Jerin\Desktop\lenna.gif');
PSF=fspecial('motion', 14,0);
gb=imfilter(f,PSF);
g=imnoise (gb,'gaussian',0,200/(255*255));
fr=deconvwnr (g,PSF);
k=fft(fr);
for i=1:1:150;
    H=pfilter('ideal',size(fr,1),size(fr,2),i);
G=H.*k;
g1=real(ifft2(G));
g1=g1(1:size(fr,1),1:size(fr,2));
e=double (f)-double(g1);
[m,n]=size(e);
rmse(i)=sqrt(sum(e(:).^2)/(m*n));
end;
i=1:1:150;
figure(2);
plot(i,rmse(i));
 
Now i am getting an error like this:

 
The output should be like this:
http://i50.tinypic.com/23hao9f.jpg[/img[/url]]
 
If posssible, guys please copy the program and work it out for the correct output, i know you can sort it out very easily. Please its urgent.[/img]

Matlab Forum

« on: »

 

  Subject / Started by Replies Last post
0 Replies
283 Views
Last post May 28, 2009, 09:37:07 AM
by gatlab
error on plotting

Started by KK

1 Replies
205 Views
Last post October 16, 2009, 10:57:46 PM
by jjasso5
0 Replies
191 Views
Last post January 28, 2010, 12:41:42 AM
by hidavi
0 Replies
42 Views
Last post May 20, 2010, 07:35:38 PM
by imdadullah