- the original picture. The lady is called Barbara and this is a standard image used to test image processing algorithms.
- the picture with noise added. You can change the amount of noise by entering a different number in the web form at the top of the page. The noise is a gaussian random function added to the pixel values of the original image. The parameter you enter in the web form (default: 10) is the standard deviation of the gaussian distribution, taken on a scale of 0 (for black) to 255 (for white).
- the picture with noise removed by my algorithm.

The algorithm tries to find the black "background" parts of the noisy image in Fourier space by averaging the pixels in a small neighborhood of each point. If the average value is low compared to a certain threshold, then the pixel is set to 0. If the average value is large compared to the threshold, then the pixel is left untouched. If the value is neither very large nor very small, the algorithm smoothly interpolates between the two possibilities. The actual formula used is:

f = 1 - ( 1 / (1 + (E c / t))^2 )Here, E is the average pixel energy near a given point, c is a constant, t is a user-specified threshold, and f is the factor by which the pixel value will be multiplied. Note that 0 <= f <= 1.

w(x) = sin( sin^2(pi x) * pi/2 )where x ranges from 0 to 1. The function has the property that w^2(x) + w^2(x+0.5) is constant on [0.5, 1], so the overlapping pieces fit together perfectly.

In our images of Fourier space, we show only every second region, so that the images do not overlap. Thus, the internal calculations use roughly four times as many regions as the web interface displays.

You will also notice that, while the image in (x,y)-space is black-and-white, there is some color in the images of Fourier space. This is not an accident: color is used because the pixels in Fourier space really correspond to complex numbers. The brightness of a pixel is proportional to the absolute value of a complex number, whereas the hue indicates its phase. The complex numbers 1, exp(2i pi/3), and exp(4i pi/3) are displayed as red, green, and blue, respectively. However, the phase of adjacent pixels is rarely related, and thus the sum of the pixels appears to be white from a distance.

You can change the size of the overlapping windows of the Fourier Transform. This will only work if the size is a power of 2; the useful range is 2-512. It is fun to plug in a smaller value, such as 32, or the maximum, which is 512.

Back to Homepage:

selinger@mathstat.dal.ca / PGP key