matlab codings for homomorphic lee filer
3 views (last 30 days)
Show older comments
i need matlab codings for homomorphic lee filter(digital image processing) for speckle noise reduction in SAR images... i have tried one coding, but i didnt get the exact output. it gives some error... so send me the exact codings for homomorphic lee filter for speckle removal....
Regards Padmavathi.B
--------- Below is from another unanswered, related thread, posted by the same person the next day
i have tried one code for homomorphic lee filter for speckle noise removal of SAR images. there is no error in the codings.but the value of mean square error is too high and so PSNR value is very low(in negative).but required PSNR range should be around 20 and mean square error value should be around 1100. here i have attached the codings that i have tried. please tell me what is the error in the codings and how to correct it.
clc;
clear all;
close all;
a=imread('C:\Documents and Settings\Administrator\Desktop\guna.jpg'); a=rgb2gray(a);
figure(1); imshow(a);
[s1 s2]=size(a);
n=imnoise(a,'speckle',0.1);
figure(2); imshow(n);
n=double(n);
for i=2:1:s1-1
for j=2:1:s2-1
x=[n(i-1,j) n(i,j-1) n(i,j+1) n(i+1,j) n(i,j) n(i-1,j-1) n(i-1,j+1) n(i+1,j-1) n(i+1,j+1)];
Im=mean(x);
s=std(x);
Cu=1/8; Ci=s./Im;
w=1-((Cu.*Cu)./(Ci.*Ci)); H(i,j)=n(i,j).*w+Im.*(1-w);
end
end
l=fft2(log(n+0.01));
D=size(H);
l=imresize(l,[D(1) D(2)]);
R=exp(real(ifft2(l.*H)));
figure(3);
imshow(uint8(R));
T=size(R);
a=double(a);
a=imresize(a,[T(1) T(2)]);
g=0;
for i=1:1:T(1)
for j=1:1:T(2)
b(i,j)=a(i,j)-R(i,j);
g=g+(b(i,j).*b(i,j));
end
end
mse=g./(T(1).*T(2))
mse=double(mse);
psnr=20*log10(255/sqrt(mse))
0 Comments
Answers (1)
Walter Roberson
on 8 Mar 2011
It is quite uncommon for people to send code upon request; at most they might point to where you can find code via Google or in the Mathworks File Exchange (FEX).
If, though, you post a copy of the error message and show the traceback of the error and the calls that led to the error message, and show the relevant code that leads up to the error, and the sizes and data types of all the variables being passed in to the call, then someone might be able to help you resolve the error you are getting with your existing code.
0 Comments
See Also
Categories
Find more on Wavelet Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!