Tuesday, May 30, 2017

FFT on non-rectangular part of image


I need to do a FFT on an image for noise reduction, but the problem is that I do not need the complete image, but only a circle in the middle. The borders are a fixed rig, thus I am not interested in what it displays, but it has an impact on the result of the FFT.


Is there any way to just cut out a circular part and use that for the FFT? Note that if I use black background, the edge between background, and image data will have quite an impact.



Answer



Instead of having a hard edge between the image data of interest and the background, you could use a two-dimensional tapered window function, as is often done in spectral analysis. You might start by trying a Gaussian window, which for a two-dimensional case would look something like:


w[x,y]=e(xNx12)22(σxNx12)2e(yNy12)22(σyNy12)2


Nx and Ny are the dimensions of the desired transform in the x and y directions, respectively, and σx and σy are parameters that allow you to control the shape of the window; for small σ values, most of the energy in the window function will be concentrated toward the center, with that effect decreasing as you increase σ.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, MgX2+ is closest in radius to LiX+. Is this true, and if so, why would a whole larger shell ($\ce{...