Dithering
Intro
Image dithering
Thresholding
Halftoning
Halftone originates in a physical printing process,
which creates printing plates which approximates shades using dots of varied size.
The choice of doing it with (density of) dots are not the only option, it is a specific choice, but it is both more predictable, more preceptually useful (more randomness might cause distracting patterns), and relates to the physical printability of the plates (both the etching and the inking might be mo)
Halftoning technically refers only to that part, and not the printing part; that is typically offset printing,
Offset printing is more about the ink transfer.
Offset printing color is done with multiple distinct plates, and with the dots created at specific angles to each other primarily to avoid moire patterns.
Technically, there are other methods of both halftoning, and of the actual printing,
more so if aiming for different media, but on paper it's mostly offset (or laser or inkjet at home),
and offset still uses metal halftone plates for images.
That is a much wider topic that we address here - e.g. when referring to printing newspapers, and packaging, and shirts, this involves processes like offset printing and, to a lesser degree, screen printing. If you care about historical accuracy, e.g. the printing of comics, you will have to look into the details of these processes, that varied over time.
Even the resolution has not changed a lot since early newspaper days. It has doubled from around 60 to 80 dpi, to 100 to 150(verify) in modern times.
Laser printers tend to do dithering instead, but the processing has some halftone-like qualities too, in part because dithering for ink and the laser process has to consider properties of ink and substrate.
(which relates to why inkjet can be better color[1], than at least same-price laser printers, at the cost of speed, and are also worse at e.g. fine lines).
Even digital halftoning has a wider context,
originally referring to (the illusion of continuous-tone images)
during preparation for digitally geared reproduction, e.g. imagesetters(verify).
...but also to what is very similar to (ordered) dithering.
...and sometimes even to mimicing much larger dots artificially.
https://en.wikipedia.org/wiki/Halftone
https://www.youtube.com/watch?v=CkKiJDeML5c
Halftoning could be considered a type of stippling -- doing shading by using small dots,
though stippling is more frequently an aesthetic choice (with dots larger than necessary)
than an optimal-approximation one.
Dithering
Dithering and halftoning live in the same area, of approximating shades in a medium that itself is binary (there or not),
Useful properties of dithering include:
- minimal introduced patterns
- minimal influence of neighbouring pixels
- high frequency noise can be spread more than lower frequency noise
- ability to use an arbitrary color palette (or at least be specialized to a specific one)
Randomized dithering
Ordered dithering
To imitate gradients of continuous-tone images, ordered dithering uses a fixed, regular pattern.
Now that we've just mentioned random dithering, consider again stepping through pixels, but the threshold is now taken from a small dither matrix (effectively tiled over the image), and again setting to black or white as a result.
In ordered dithering, both the size of that matrix, and the arrangement of the values in there, have a distinct effect on the result.
Upsides:
- Is simplest to implement, fast to execute, and requires minimal memory (neighbouring pixels have no effect).
- extended to RGB easily enough
Limitations:
- This will often have noticeable grid and/or crosshatch patterns.
- on a larger scale, that may look like diagonal lines
- harder to combine colors and multiple levels
https://en.wikipedia.org/wiki/Ordered_dithering
dispersed dot ordered dither
Bayer
blue noise
clustered dot ordered dither
Error diffusion dithering
Error diffusion amounts to mean that whenever a pixel color choice introduces error, it is allowed to travel to a nearby pixel (that has not yet been decided).
It steps through the pixels as before,
but after thresholding it calculates how much too bright or dark we just made that pixel,
and moves that to neighbouring somehow (affecting their decisions).
So if we made a pixels too bright, a neighbouring pixel will be made darker, and the other way around.
Upsides:
- Error diffusion methods tend to look better than ordered,
- in part because they end up mostly pushing around the higher-frequency information more than the coarser detail,
- while avoiding at least some kinds of patterns
- Limitations:
- we're still fighting patterns, just less
Simple error diffusion dithering
Floyd-Steinberg dithering
Jarvis-Judice-Ninke dithering
Stucki dithering
Burkes dithering
Sierra dithering
Atkinson dithering
Electrostatic Halftoning
Riemersma dither
Yliluoma dithering
Fan dithering
Unsorted
Blue noise in dithering
Lattice-Boltzmann dithering
Implementation variations
Non-rectangular dithering
Supercell dithering
void-and-cluster
Color dithering
Dithering as an aesthetic
Inverse halftoning/dithering
Duotones, tritones, etc.
Dithering and movement
Stippling
https://en.wikipedia.org/wiki/Stippling