Author Topic: pfilter error. please help.  (Read 677 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]

Offline England90

  • Jr. Member
  • *
  • Posts: 15
  • Matlab Forum
    • View Profile
Re: pfilter error. please help.
« Reply #1 on: October 10, 2010, 09:34:40 AM »
I also find out about this problem, it's really hard!

Matlab and SimuLink Development Forum

Re: pfilter error. please help.
« Reply #1 on: October 10, 2010, 09:34:40 AM »