Tutorial · Output Stage

Binarization and Threshold Methods in ScanTailor Advanced: Choosing How a Page Becomes Black and White

Binarization is the decision, pixel by pixel, of what becomes black ink and what becomes white paper. It is the single biggest determinant of whether your finished book looks crisp or moth-eaten — and ScanTailor Advanced gives you more threshold methods to make that decision with than any earlier branch of the project.

← Previous: Dewarping

First Decision: the Output Mode

At the Output stage each page is rendered in one of three modes. Binarization only exists inside two of them:

Black and White

Every pixel is forced to black or white by the threshold. The right mode for plain text and line art: smallest files, highest contrast, and the cleanest input for OCR. It has no greys to offer photographs — halftones turn to mush — so it is the wrong mode for illustrated pages.

Color / Grayscale

No binarization at all: the page keeps its tones. Margins can be filled white and illumination equalised (the background normalised to white, contrast lifted in shaded areas). Use it when the page itself — a manuscript, a plate, a coloured diagram — is the content.

Mixed

The hybrid the program is known for: pictures are detected and kept as grayscale/colour with equalised illumination, while everything else is binarized to black and white. When automatic picture detection merges a photo into the background, draw a picture zone by hand — zones can only be created in this mode.

Output files are TIFF. The program’s compression settings distinguish black-and-white and colour output — for black-and-white TIFFs the choices are None, LZW, Deflate and CCITT Group 4 (the default); for colour, None, LZW (the default), Deflate and JPEG.

The Threshold Methods, as Documented

The standard threshold decides black versus white from each pixel’s brightness against a cut-off, with a slider to shift that balance: if letters come out broken or missing, move the threshold so text gains thickness; if the page fills with speckle and bleed, move it back. That simple global decision works on evenly lit, decent paper — which is why the Advanced branch added alternatives for when it does not.

Before switching methods: normalise the illumination

The Output stage offers control over normalising illumination before binarization. Uneven lighting — a bright centre fading to grey corners — defeats any single global cut-off, because “dark enough to be ink” differs across the page. Normalising flattens the background first, and a large share of “the threshold is wrong” pages are actually “the lighting was uneven” pages. Try this before changing methods.

Adaptive methods: Sauvola and Wolf

ScanTailor Advanced adds the Sauvola and Wolf adaptive binarization algorithms. Instead of one cut-off for the whole page, adaptive methods judge each pixel against its local neighbourhood, so a faint line in a shadowed corner can still become ink while a clean area stays clean. The README positions them precisely: they can be applied when normalizing illumination does not help. Treat them as the second line of attack for pages whose background refuses to even out — stained, yellowed, or unevenly aged paper.

New in v1.1.1: Fox, Window, and Grad

The v1.1.1 changelog (April 2026) added three more threshold methods:

  • Fox and Window — introduced together as additional binarization methods “for improved black/white conversion, especially on difficult scans” (the changelog’s own words).
  • Grad — a method with adjustable lower and upper bounds, giving more precise control over edge-based thresholding: you bound the range within which the edge decision is made, instead of accepting a single global level.

There is no honest universal ranking of these methods — the right one is a property of your paper and your capture, which is why the program ships several. Work on a representative bad page, try the candidates at reading zoom, and then apply the winner project-wide rather than mixing methods page by page without reason.

Choosing by Paper Condition

  • Clean modern paper, even light: the standard threshold, default settings. Don’t fix what renders perfectly.
  • Uneven lighting or shadowed gutter: normalise illumination first; re-check. Most pages recover here.
  • Yellowed or stained paper: the background is no longer uniformly “paper-coloured”, and a global cut-off either greys the page or thins the text. Adaptive methods (Sauvola, Wolf) or the v1.1.1 methods aimed at difficult scans (Fox, Window) are the documented next step.
  • Bleed-through (reverse-side text showing): the ghost text is real ink-coloured signal, just fainter. A threshold shifted toward thicker text makes the ghost stronger, so bias the other way — accept slightly thinner strokes to drop the show-through below the cut-off — and lean on illumination normalisation to separate the two sides’ brightness.
  • Faded print: the opposite problem: ink barely darker than paper. Shift the threshold to thicken strokes, and prefer adaptive methods, which respond to local contrast rather than an absolute level the faded page may never reach.
  • Mixed text and photographs: don’t binarize the photos at all — Mixed mode with picture zones.

Despeckle: the slider with teeth

Despeckling removes the dust, dots and scanner noise that binarization promotes to “ink”. In ScanTailor Advanced its strength is a slider: 1.0 matches the old cautious mode, 2.0 is normal, 3.0 is aggressive (values are the README’s own calibration). Respect the mechanism the documentation describes: despeckling removes objects up to a size limit — letters exceed that limit and are safe, but punctuation marks may not. Aggressive despeckling on fine print can eat full stops, dots on i’s, and diacritics. Despeckling is unavailable in Color/Grayscale mode, which is a hint about its purpose: it is a black-and-white cleaning tool. If the source pages are reasonably clean, the project’s standing advice applies — don’t despeckle; lost text cannot be compensated for by thickening what remains.

One more Output-stage capability worth knowing exists: the rendered output can be split into foreground (letters) and background (images) layers — B/W or original-colour foreground — primarily as preparation for high-quality DjVu encoding. Most readers will never need it; archivists building DjVu editions should know it is there.

← Previous: Dewarping Next: Batch Processing →

Frequently Asked Questions

Which threshold method is best?

There isn’t one — it depends on the paper and the capture. Start with the standard threshold plus illumination normalisation for uneven light. Move to the adaptive Sauvola or Wolf methods when normalising does not help, and try the v1.1.1 additions — Fox and Window for difficult scans, Grad when you need bounded, edge-based control. Judge on your worst representative page, at reading zoom.

Why is text disappearing in Black and White mode?

The threshold cut-off is set so faint strokes fall on the “paper” side. Move the threshold slider toward thicker text and check whether uneven illumination is the real cause — if the page’s background brightness varies, normalise illumination before binarization rather than forcing a global level. Note the trade: thickening text also strengthens bleed-through ghosts.

Can despeckling damage my text?

Yes, if overused. Despeckling removes objects up to a size limit; letters exceed it, but punctuation marks may not, so aggressive settings (toward 3.0 on the slider) can eat full stops and dots on fine print. The cautious end of the slider (1.0, the old cautious mode) exists for exactly this reason, and clean scans are best left undespeckled.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *