1

For various reasons, certain images may have areas filled with dots instead of solid colors. This is most common when the number of colors is limited, as in scans of images printed by old printers, or dithered GIFs. The problem with these images is that they don't compress very well (PNG and JPEG work best with horizontal lines and smooth gradients, respectively) and scaling them can cause the dots to merge, resulting in strange patterns that aren't supposed to be in the image.

I want a method to automatically "de-dither" an image, replacing the dots in dotted areas with solid color. For example, it should make the right left side of this image look more like the left right side:

example showing a crude dot-filled image on the right and a solid-fillied image on the left

I especially want a solution that works in the GIMP or Imagemagick, but I am also willing to try other tools.

1

It depends on what are your quality requirements. One of the ways to go would be:

  • Apply Gaussian Blur (subject to careufully chosen radius; for this image I would recommend 3X3)
  • Dilate, this would result into solid colors that you wanted
  • (optional) Sharpen, to enhance edges

here is result you can achieve:

result

Right part is from your original picture, left part is processed as described above

The disadvantave is that this method can hardly be automated. You will need to adjust Gaussian blur and sharpness parameters specifically for every case.

  • +1 because that worked much better than I expected. I can see some potential problems though, like the blocking there and different parts of the image reacting differently. – Wutaz Mar 13 '14 at 22:03
  • Well, generally there can be different variations of solutions however all approaches that I can think of are based on using blur + something else. I would really like to see someone post different method. – Art Gertner Mar 13 '14 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.