I've been looking for a long time for "adaptive threshold" filter. Use-case: badly phone-camera'd printouts sent by teachers to be printed at home, with shadows, colors and such. If anyone knows of a plugin, I'm all ears.

In the meantime, I found these pre-processing steps work well:

1) Convert to grayscale
2) Duplicate layer
3) Gaussian blur with a large radius (depends on source material)
4) Set layer mode to "difference"
5) Merge down
6) Colors > Invert (shadows and shade variations have now been mostly removed)
7) Colors > Threshold

OK, I found that "Divide" as a layer mode works even better than "Difference" for black&white source material. For "Divide", the "Invert" step is not required.

Follow

Learning as I go: apparently you can already specify the "image mode" directly when applying the Gaussian blur, which obsoletes most of the steps, and you can see the effect preview directly as you tweak the radius.

This makes preprocessing the source material super easy, barely an inconvenience.

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!