php - Detecting noise/artifacts in an image

499

Is there a reliable way of detecting noise or artifacts in an image, consisting of text and images (page from a PDF file), while not harming the text or "real" pictures. Only removing the noise, specks, blotches, etc.?

358

Answer

Solution:

In general, there is no reliable, non-destructive way -- this would mean to ask a computer program to "magically" know what's noise and what is not. However, there are methods that get close in practice.

One commonly applied method which is reasonably simple and often not very destructive is a small radius (3-5) median filter. A median filter is good at finding scratches or "wrong pixel" noise.

Another noise reducing method would be a bilateral filter, which in layman terms is basically a blur that respects features.

Yet another method to detect and filter noise would be akin to the technique Pixar used in their "wavelet noise" algorithm:

  • downsample the image (e.g. by one mip level, a.k.a. 1/2 in every direction)
  • subtract the downsampled image from the original (implicitly upsampling again)
  • what remains, the difference, is what couldn't be represented in the lower resolution image, thus noise
571

Answer

Solution:

There's no statistical way which would exactly remove noise, you can use Super Resolution GANs though, make a sythetic data and train your model for noisy to clean images.

People are also looking for solutions to the problem: javascript - Google geolocation not taking all ajax parameter for address

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.