Bandpass filter applied to an image
16 views (last 30 days)
Show older comments
so my question is how do I make a bandpass filter. I have never used one. Bandpass docs online show only a version of sinals. how do I use it for a picture? thanks
0 Comments
Accepted Answer
Image Analyst
on 2 Dec 2019
Hints. One way is to fft2() the image, then zero out some portion of the spectrum, then ifft2().
A second way is to do a difference of Gaussians filter -- check out fspecial() and conv2().
2 Comments
Image Analyst
on 3 Dec 2019
You're trying to combine both methods that I told you into one. Don't do that. Do just one or the other. If you want to do the fft method, just zero out parts of the a2 arrays. Don't do anything with gaussian kernels for that method. Something like
ra2 = real(a2); % Get real part
ia2 = imag(a2); % Get imaginary part
ra2(row1:row2, col1:col2) = 0; % Repeat for other ranges. You determine the rows and columns.
% Same for ia2, then combine ra2 and ia2 back into complex array and call ifft2
See what you can do with that.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!