Low pass frequency filter.
function call:
[out_img1r,out_img1i]=vsg('FFTLowPass',in_img1r,in_img1i,rad1);
Arguments:
in_img1r
- input image, 3
channel
in_img1i
- input image, 3 channel
rad1
– a double which specifies a radius.
Description:
The user defined
input value is the cutoff frequency for the low-pass filter.
out_img1r – the output image values are the real FFT coefficients
of the input image if they lie within the radius, otherwise they are set
to 0.
out_img1i
– the output
image values are the imaginary FFT coefficients of the input image if
they lie within the radius, otherwise they are set to 0.
Example:
img = imread('baboon.jpg');
h=figure;image(img); set(h,'Name','Input
Image');
[out_img1,out_img2]=vsg('FFT',img);
[out_img1r,out_img1i]=vsg('FFTLowPass',out_img1,out_img2,0.2);
[out_img2]=vsg('InvFFT',out_img1r,out_img1i);
h=figure; image(uint8(out_img2));set(h,'Name','FFTLowPass');