Hello,
This is about the band-pass filter option available under Process - FFT. I work primarily with lattice images. The power spectrum displayed using Process - FFT has peaks corresponding to the periodicity of lattice fringes in my image. The band-pass filter could be an option in some of the cases to filter out non-periodic noise. However, I have been unable to understand the input values for the band-pass dialog box. The documentation says about the 'filter large structures down to' and 'filter small structures up to' fields the following "Note that these values are both half the spatial frequencies of the actual cutoff" This is unclear to me - are these values in pixel units, or scaled units, and are they to be given in real space units or in the spatial frequency domain? The default values of 40 and 3 seem to work for many of my images though. Looking at the mask created, these numbers do not seem to match the spatial frequencies seen in the power spectrum of the image displayed with Process -> FFT -> FFT. In fact the mask seem to be in real space and is not treated as a Fourier space object - x, y are displayed in pixel units in the status bar of the main ImageJ window. So, how is this mask applied to the image? Any pointers to a better understanding is most appreciated. Thanks, Divakar -- *Dr Divakar Ramachandran* Anupuram, TN 603127, India -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Divakar,
The bandpass filter works by multiplication in the Fourier domain. If you check 'display filter', it actually shows the response in the frequency domain. To see what frequencies this corresponds to, do an FFT of the original image, then copy and paste the 'Filter' image to the FFT. Now the cursor position will be shown in the pixels/cycle (or scaled units/cycle). The numbers in the 'Filter small/large structures to' fields are in pixels. If you enter 40, it means the cutoff frequency will be 80 pixels/cycle. The reason behind this factor of 2 is the Nyquist theorem. As a simple example, if you have alternating dark and bright stripes, each stripe with a width of 40 pixels, the periodicity will be 80 pixels. Thus, to have these stripes at the cutoff frequency, you have to set the cutoff frequency to 80 pixels/cycle. By the way, the 'cutoff' of the Bandpass is actually very soft; the filter uses a Gaussian function (centered at frequency zero) for the lowpass and (1-Gaussian) for the highpass. The cutoff frequencies mentioned above are those where the Gaussian reaches a value of 1/e. Since the Fourier transform of a Gaussian is also a Gaussian, you could also get the same type of filter with the ImageJ built-in Gaussian Blur and the 'Highpass' plugin (this is sometimes called a 'Mexican Hat' filter). Note that the radius (sigma) of these filters is defined such that the value of the Gaussian is 1/sqrt(e) at the radius given. --- If you have nicely periodic structures, you can have a more selective filter: Do an FFT, paint the spots white (pixel value 255) and do an inverse FFT. Everything that was painted white (with some blurring of the edges to avoid ringing) will be transformed back; the rest of the FFT will be discarded. [Note that the FFT window that you see is only for display, it does not hold the actual data. The 'real' FFT data are hidden behind the image and not modified by painting on the displayed FFT image]. Michael ______________________________________________________ On Sun, November 10, 2013 04:34, Divakar Ramachandran wrote: > Hello, > > This is about the band-pass filter option available under Process - FFT. > I work primarily with lattice images. The power spectrum displayed using > Process - FFT has peaks corresponding to the periodicity of lattice > fringes in my image. The band-pass filter could be an option in some of > the cases to filter out non-periodic noise. However, I have been unable > to understand the input values for the band-pass dialog box. The > documentation says about the 'filter large structures down to' and > 'filter small structures up to' fields the following "Note that these > values are both half the spatial frequencies of the actual cutoff" This > is unclear to me - are these values in pixel units, or scaled units, and > are they to be given in real space units or in the spatial frequency > domain? The default values of 40 and 3 seem to work for many of my > images though. Looking at the mask created, these numbers do not seem to > match the spatial frequencies seen in the power spectrum of the image > displayed with Process -> FFT -> FFT. In fact the mask seem to be in > real space and is not treated as a Fourier space object - x, y are > displayed in pixel units in the status bar of the main ImageJ window. > So, how is this mask applied to the image? > > Any pointers to a better understanding is most appreciated. > > Thanks, > Divakar -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |