Name
filt_gaussl - Gaussian low-pass Fourier filter
Usage
output = filt_gaussl(image, sigma, pad)
Input
- image
- input image (can be either real or Fourier)
- sigma
standard deviation of the Gaussian function in absolute frequency units `f_a`.
- pad
- logical flag specifying whether before filtering the image should be padded with zeroes in real space to twice the size (this helps avoiding aliasing artifacts). (Default pad = False).
Note: for sigma = 0.5 (the Nyquist frequency) the value of the filter at the maximum frequency is `G(f_N)=1/sqrt(e)=0.61`.
Output
- output
- filtered image. Output image is real when input image is real or Fourier when input image is Fourier
Method
Fourier transform of the input image is multiplied by a radially symmetric Gaussian filter:
`G(f) = exp(-f^2/(2 sigma_f^2))`
In effect, it is same as convolution to a real space symmetric Gaussian model, whose sigma is
`sigma_r = 1.0/(2*pi*sigma_f)`
For example: for any image m if you do:
fm1 = filt_gaussl( m, 0.1 ) fm2 = rsconvolution( m, model_gauss(1.0/(2*pi*0.1), nx, ny, nz) ) print ccc(fm1, fm2)
the ccc between the fm1 and fm2 should be 1.0.
Reference
Gonzalez, R. F., Woods, R. E., 2002. Digital Image Processing. Prentice Hall, Upper Saddle River, NJ.
Author / Maintainer
Pawel A. Penczek
Keywords
- category 1
- FILTER
- category 2
- FOURIER
Files
filter.py
Maturity
- stable
- works for most people, has been tested; test cases/examples available.
Bugs
None. It is perfect.