Page 1 of 1

Removing "checks" dithering

Posted: 2019-10-11T19:48:34-07:00
by BenjaminKim

I have monotone images being generated outside of IM, and contain what's effectively the "ordered-dither=checks" dithering.

I've been trying to figure out a way to remove such dithering - what I'd like is to make any/all instances of such dithering fully black.

Example file is (Group 4 monochrome tiff): ... rjohtvWF82

And here is the up-close zoom of the dithering: ... rECwvxYoV4 ... tyU-91jdNP ... 0vLY8hqMZ0

Ultimately, where dithering exists, I'd like to make it black. In the third close-up, I'd want to make it black up until there is a solid area of white.

I've been trying to leverage morphology to accomplish, but not having much luck. Any input or thoughts is greatly appreciated.

Re: Removing "checks" dithering

Posted: 2019-10-11T21:09:53-07:00
by fmw42
One potential way is notch filtering via FFT processing. See ... se_removal

Another way, might be to simply create a mask image that is black where the checkerboard does not exist and white where it does. Then use the mask to replace the checkerboard with a black image by 3 image compositing. See

Re: Removing "checks" dithering

Posted: 2019-10-12T05:33:37-07:00
by snibgo
How about (Windows syntax):

Code: Select all

magick ^
  001.tif ^
  ( -clone 0 -morphology HMT 3x1:0,1,0 -negate ) ^
  ( -clone 0 -morphology HMT 1x3:0,1,0 -negate ) ^
  -background None ^
  -compose Darken -layers flatten ^

Re: Removing "checks" dithering

Posted: 2019-10-13T18:03:39-07:00
by BenjaminKim
Oh wow - perfect - thank you! I had not looked into FFT - but have definitely reviewed everything I could find you've written re Morphology. I had actually explored HMT for a bit to deal with something way earlier in the process, but ultimately took a different approach and forgot about it.

This is great - thank you so much!