Adaptive Fourier Filter

228 Views Asked by At

Main question

Have someone already created a free adaptive Fourier filter for Digital Micrograph (or alternatively ImageJ)?

About the adaptive Fourier filter

I want to use some effective filtering processes for my TEM image processing. I came across the adaptive Fourier filtering technique introduced by Möbus et al. in 1993 [1]. In short this is a reciprocal space filtering technique with the workflow:

FFT( Image ) --> Mask * FFT( Image ) --> iFFT( Mask * FFT( Image ) )

The new feature of this filter is that the shape of the filter is adapted to the spectrum of the image and the windows of the mask are automatically placed at all positions which allows an optimal separation of signal from noise [2].

What have I already tried?

The filter is available in the HREM Filters Pro package from HREM Research https://www.hremresearch.com/Eng/plugin/FiltersEng.html , but my institute does not have a license for this. I have found DM scripts for other filters such as Wiener filters and average background subtracted filters on the DM script database https://www.felmi-zfe.at/dm_script, but there is no adaptive filter.

So what was the question again?

Since I have no experience with DM scripting myself, I would prefer to find or adjust an already existing DM script on adaptive Fourier filtering. Alternatively, I also do some of my image processing in ImageJ, so a script for this program would work as well. Do any of you know whether such scripts already exist?

Sources

[1] Möbus, G., G. Necker, and M. Rühle. "Adaptive Fourier-filtering technique for quantitative evaluation of high-resolution electron micrographs of interfaces." Ultramicroscopy 49.1-4 (1993): 46-65.

[2] Kret, S., et al. "Extracting quantitative information from high resolution electron microscopy." physica status solidi (b) 227.1 (2001): 247-295.

2

There are 2 best solutions below

0
On

I'm not aware of an (open source) script for this, but a base template for a Fourier-Space filtered script in DigitalMicrograph would be:

// Create and show test image
realimage img := RealImage( "Test Image 2D", 4, 512, 512 )
img = abs( itheta*2*icol/(iwidth+1)* sin(iTheta*10)  ) + 15*(irow<iheight/2 ? irow : iheight-irow )/iheight
img = PoissonRandom(100*img)
img.ShowImage()
 
// Transform to Fourier Space
compleximage img_FFT := FFT(img)
 
// Create "Mask" or Filter in Fourier Space
// This is where all the "adaptive" things have to happen to create
// the correct mask. The below is just a dummy
image mask := RealImage("Mask",4, 512,512 )
mask =  (iradius<iheight/3 && iradius>5 ) ? 1 : 0
mask =  SQRT((icol-iwidth/2-100)**2+(irow-iheight/2-50)**2) < 25 ? 0 : mask
mask =  SQRT((icol-iwidth/2+100)**2+(irow-iheight/2+50)**2) < 25 ? 0 : mask
mask.ShowImage()

// Apply mask
img_FFT *= mask 
img_FFT.SetName( "Masked FFT" )
img_FFT.ShowImage()
 
// Transform back
image img_filter := modulus(iFFT(img_FFT))
img_filter.SetName( img.GetName() + " Filtered" )
img_filter.ShowImage() 

// Just arrange
EGUPerformActionWithAllShownImages("arrange")
0
On

The Adaptive Threshold ImageJ plugin which can be downloaded from:

https://sites.google.com/site/qingzongtseng/adaptivethreshold

is indeed an adaptive filter.