Image Analyzer examples

Help index

Frequency Domain Filter

Frequency Domain Filter (or FDF for shortness) allows you to edit the frequency spectrum of an image. You can remove particular frequencies from a picture, which can be useful to get rid of moiré noise in scanned images or in pictures like stillframes from an analog TV broadcast.

Understanding FDF representation

The frequency spectrum is in coordinates similar to polar, the (0, 0) point is at the center of the top edge of it. Since it is mapped to a rectangular area, both halves of the top of the graph are in fact adjacent to each other. The distance from the center means increasing frequency (and decreasing of detail size), and the angle of rotation is the angle at which a particular frequency exists in the source image, but with difference of 90 degrees. At the very center where frequency is 0 there is an area that defines brightness and contrast distribution of the whole image. If you remove it the image will lose its filled areas and only edges will remain.

Using FDF to remove moiré noise from a scanned image

For colored images FDF operates only on the luminance plane, so if you need to edit the whole image, you will need to split it to several planes, edit them independently and then combine them back.

On scanned images you can usually see the two kinds of elements in their frequency representation: the "star" and the "beam".
Stars represent the pattern noise frequencies that you'd want to remove. To find out the orientation of pattern noise in the image for a particular star, think of a tangent line to the circle in the point where the star is located. The corresponding noise in the image will be in a form of waves parallel to that line. The cross-shaped lines coming out of stars represent the noise that is close to high-contrast edges on the image. Combination of waves from all stars results in what is called "moiré noise".
Beams starting at the center point represent high-contrast lines in the source image. You would want to keep them intact to avoid ringing around those edges. Best practice would be to get rid of unnecessary high-contrast lines in the image, such as borders or text, before editing it in FDF.

On the picture above you can see the beams representing the tripod legs and the stars corresponding to wave noise. The vertical line is due to a horizontal bottom border.

The stars are often symmetrical relative to the vertical line in the center, you can use the "mirror" option to speed up processing, working only on a half of the FDF image. Use "Amplitude scale" setting to change brightness of the image to see higher or lower frequencies better.
Once you remove all stars, there should be no moiré noise left on the image.

What else can you use FDF for?

Another kind of element you can see on FDF image is a beam that does not start in the center point. Instead it will start at the edge and will be parallel to one of the beams that represent high-contrast lines.

It represents aliasing, the ladder-like artifacts on those lines of the image. Again, you can remove those frequencies and get rid of aliasing.

Upscale detection
In a similar way to aliasing, the consequences of image resampling that happens during resizing can be seen in FDF. You can even detect a method which was used during upscaling the image.

Nearest neighbor/point resample creates the most aliasing, you can see its frequencies massed at the edges of the spectrum.

Filters like bicubic resize blur the image, removing high-frequencies and shaping the spectrum into a rectangle.

Specialized filters like wiener are aligned diagonally, which makes the fact of upscale harder to see on the source image, but it is noticeable in FDF.

Improvised steganography

You can conceal information in the frequency spectrum by drawing it in FDF. The distance of your drawing from the center point will determine how noticeable the changes made to the souce image will be, as well as how resilient the hidden information will be to image resizing and other filtering. You can apply random noise to the image prior to drawing to get more room in the area of higher frequencies.       2016-10-22 by Seedmanc