23. 5. 2014

Texture elimination from scanned photo

Recently I needed to scan quite old photography that was aimed to be published in one local newspaper. I wanted the best quality with dpi around 300. Unfortunately it had this very old-fashioned texture on the top that makes it difficult to scan it properly. The texture will be still there and ruin the result quality.

After some googling about moiré patterns and fast fourier transforms (FFT, it is also used in MRI) I found this very helpful discussion:
- especially the point about FFT.

Here is the technique with FFT:

  1. Download the ImageJ software
  2. Select the part of the image with pattern (e.g. somewhere in the corner). The idea is to see just the pattern.
  3. Apply FFT on the selected image pattern and notice how does it look like in the frequency space.
  4. Apply FFT on the whole image and find the pattern that was present on the selected image after FFT.
  5. Using paintbrush paint the pattern with black color. Do not paint the center.
  6. Apply inverse FFT.

Here is my example:

There is another interesting technique where you scan the image twice with rotation of the second scan about 180°. Then align the images. I didn't use this because the FFT method was much more interesting for me. I would use it probably if I couldn't find the clearly defined pattern in the image (e.g. no clear background).

Žiadne komentáre:

Zverejnenie komentára