Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Gaussian High Pass Filter
Replies: 1   Last Post: Jul 28, 2013 9:50 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
lina

Posts: 1
Registered: 7/27/13
Gaussian High Pass Filter
Posted: Jul 27, 2013 5:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,
I try to apply Gaussian High Pass Filter function

a=imread('img');
figure(1)
imshow(a)
[m n]=size(a);
f_transform=fft2(a);
f_shift=fftshift(f_transform);
p=m/2;
q=n/2;
d0=70;
for i=1:m
for j=1:n
distance=sqrt((i-p)^2+(j-q)^2);
low_filter(i,j)=exp(-(distance)^2/(2*(d0^2)));
end
end
filter_apply=f_shift.*low_filter;
image_orignal=ifftshift(filter_apply);
image_filter_apply=abs(ifft2(image_orignal));
figure(2)
imshow(image_filter_apply,[])

but I got this error

??? Error using ==> times
Matrix dimensions must agree.

can Someone help me



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.