FFT band-stop filter.
function call:
[out_img1r,out_img1i]=vsg('FFTBandStop',in_img1r,in_img1i,rad1,rad2);
Arguments:
in_img1r
- input image, 3 channel
in_img1i
- input image, 3 channel
rad1
– a double which specifies the smaller radius.
rad2
– a double which specifies the larger radius.
Description:
The user defined
inputs rad1 and rad2 are the inner and outer bounds of the
band-stop region.
out_img1r
– the output image values are the real FFT coefficients of the input
image if they lie inside radius1 and outside radius 2, otherwise they
are set to 0.
out_img1i
– the output image values are the imaginary FFT coefficients of the
input image if they lie inside radius1 and outside radius 2, otherwise
they are set to 0.
Example:
img = openimage('baboon.jpg');
h=figure;image(img);set(h,'Name','Input
Image');
[out_img1,out_img2]=vsg('FFT',img);
[out_img1r,out_img1i]=vsg('FFTBandStop',out_img1,out_img2,0.2,1.2);
[out_img2]=vsg('InvFFT',out_img1r,out_img1i);
h=figure; image(uint8(out_img2));set(h,'Name','FFTBandStop');